thx / resvg-js

A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs.
https://resvg-js.vercel.app/
Mozilla Public License 2.0
1.57k stars 57 forks source link

Playground background value support alpha #336

Closed maczyt closed 6 months ago

maczyt commented 6 months ago

https://resvg-js.vercel.app/ Can the Playground background support alpha configuration?

yisibl commented 6 months ago

Do you want the background to show as a checkerboard pattern representing translucency?

image

maczyt commented 6 months ago

No, I just hope the color selector can set the alpha value. I think resvg supports rgba. just like it:

image
yisibl commented 6 months ago

Currently we use the color picker provided by the browser's <input type="color">. Can you file a bug with Chrome? https://issues.chromium.org/issues/wizard

Also, I'll try to write a function to set the alpha on the page.

maczyt commented 6 months ago

According to the mdn document, this should provide color selection for the simplest purpose. Thank you for your reply.

image
yisibl commented 6 months ago

@maczyt Regarding the alpha picker, the HTML specification is still under discussion.

I've added a custom implementation to the main branch, which I hope you'll like.

maczyt commented 5 months ago

@maczyt Regarding the alpha picker, the HTML specification is still under discussion.

I've added a custom implementation to the main branch, which I hope you'll like.

It looks fantastic,appreciate it