UNPKG
caxinha
Version:
latest (0.2.62)
0.2.62
0.2.61
0.2.60
0.2.59
0.2.58
0.2.57
0.2.56
0.2.55
0.2.54
0.2.53
0.2.52
0.2.51
0.2.35
0.2.34
0.2.33
0.2.32
0.2.31
0.2.25
0.2.24
0.2.23
0.2.22
0.2.21
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.89
0.1.88
0.1.87
0.1.86
0.1.85
0.1.84
0.1.83
0.1.82
0.1.81
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A npm of image manipulation, gif catcher and functions
caxinha
/
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(); }