colorjs / color-space

Math & data behind color spaces and color conversions.
http://colorjs.github.io/color-space
The Unlicense
324 stars 25 forks source link

RGBA support #45

Open RobinBol opened 6 years ago

RobinBol commented 6 years ago

Is there a specific reason RGBA is not one of the supported color spaces? I saw the color-rgba and color-alpha modules which seem to handle this well, unfortunately it is not available in color-space.

Thanks!

chrisgervang commented 6 years ago

I think the main reason for this is that many color spaces don't have an alpha channel. Or maybe if they do have an alpha (like rgba, rgba hex, or hsla), they probably don't need to do a complex conversion to maintain the correct alpha channel.

I'm not a maintainer of this project, but I think it'd be valuable to add support for these alpha channel color spaces to this package! I think if you wanted to work on a PR it would be appreciated!

Alternatively, I'd be happy to help you with a specific conversion you're trying to do involving an alpha channel.