UNPKG
multi-djs
Version:
latest (0.0.16)
0.0.16
0.0.15
0.0.14
0.0.12
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.4
0.0.2
A npm of image manipulation, gif catcher and functions
multi-djs
/
src
/
photoshop
/
color.js
8 lines
•
314 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
module
.
exports
= async (color =
"#FFFFFF"
) => {
const
Canvas
=
require(
"canvas"
);
const
canvas
=
Canvas.createCanvas(
2048
,
2048
);
const
ctx
=
canvas.getContext(
"2d"
); ctx.fillStyle = color; ctx.fillRect(
0
,
0
, canvas.width, canvas.height);
return
canvas.toBuffer(); }