mdn / css-examples

Code examples that accompany the MDN CSS documentation
https://developer.mozilla.org/en-US/docs/Web/CSS
Creative Commons Zero v1.0 Universal
618 stars 854 forks source link

Color picker: hexa value does not take account of alpha channel #100

Open nboisteault opened 1 year ago

nboisteault commented 1 year ago

Hi, Here https://mdn.github.io/css-examples/tools/color-picker/

image

Thanks for this nice tool.

yarusome commented 1 year ago

Since alpha values cannot be guaranteed to be represented by hex accurately anyway, I think it's better to add a warning there that the hex value doesn't account for the alpha value.

Btw, color picker's panel has been updated so that RGBA, HSLA and HEXA now become RGB, HSL and HEX.

nboisteault commented 1 year ago

I did not think about number => hexa conversion. Thanks for clarification.