jsvine/spectra

lch does not match with R's hcl

Opened this issue · 2 comments

For example:
spectra.lch(65, 100, 15).hexcode = '#FF0077'

In R:
hcl(15, 100, 65) = '#F8766D'

================

Update:

The problem is that the lch refers to colormath.color_objects.LCHabColor. However in R, the lch function is actually the polar coordinates of the LCHUV color space, which is defined in colormath as colormath.color_objects.LCHuvColor.

Maybe it would be ideal for spectra to break its lch definition into LCHabColor and CLHuvColor?

Agree. I wrote a function by myself and could push it to master