deno-canvas
deno-canvas copied to clipboard
Support hsla color annotation
I realize this is probably an issue with canvaskit-wasm, but still it would be awesome if it worked (perhaps by inlcluding an additional small dependency). All the major browsers now support hsla, and all the other color annotations I tried worked (inc. rgba and hsl).
Reproduction steps:
const img1 = createCanvas(100, 100);
const ctx = img1.getContext("2d");
ctx.fillStyle = "hsla(0, 100%, 50%, 50%)";
ctx.fillRect(10, 10, 200 - 20, 200 - 20);
await Deno.writeFile("image.png", canvas.toBuffer());