lucasb-eyer / go-colorful

A library for playing with colors in go (golang).
MIT License
1.14k stars 57 forks source link

Documentation of CIE LCh(uv) #59

Closed yurivish closed 2 years ago

yurivish commented 2 years ago

Hi, thanks for this great package. I'm using it to convert colors to LuvLCh, and noticed that the documentation says

This is generally the most useful one; CIE-Lab space in polar coordinates, i.e. a better HSV. H° is in [0..360], C almost in [-1..1] and L as in CIE-Lab.

But that C* is actually in [0..1]; this makes sense, since the hue is 0-360, rather than 0-180.

I might be misunderstanding something, but it seems the documentation could be updated to reflect the narrowed range of the C* parameter, and this might apply to the other similar color spaces too.

Thanks again!

makew0rld commented 2 years ago

I can confirm that C is always >= 0. Thanks for making this issue. Fixed in 614c0f3.