Skip to content

Support hsla color annotation #37

@CAYdenberg

Description

@CAYdenberg

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());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions