Qix- / color-convert

Plain color conversion functions in JavaScript
MIT License
746 stars 96 forks source link

can this library provide conversion to xyY color space as well #80

Open smmehadi opened 4 years ago

smmehadi commented 4 years ago

We are planning to use this library for color conversions and it looks great, the only missing part is it doesn't provide conversion to xyY color space. please include that.

RobinBol commented 4 years ago

I am looking for that functionality as well!

It is relatively easy to convert XYZ to xyY, and since this library provides XYZ -> RGB you can basically do anything once you converted XYZ to xyY.

x = X/(X+Y+Z)
y = Y/(X+Y+Z)
Y = Y

Source: http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_xyY.html

Qix- commented 4 years ago

Feel free to submit a PR :)