Function that converts rgb color to CAM02-UCS coordinates

The state of the art perceptual uniform colormaps (matplotlib viridis, plasma, magma, inferno, cividis), all sequential cmocean and cmasher colormaps,
and a few seaborn ones have linear lightness in the color appearance model CAM02-UCS, where a color is represented in cylindrical coordinates by J’(lightness), C’ (chroma}, H’(hue).
My question: is there a Julia package that defines a conversion function from srgb and J’C’H’ and conversely?

Colors.jl and related packages

I coudn’t find which one performs such a conversion. Could you please point out the function name?

Colors.jl does not support the CAM02-UCS.

Of course it is possible to add it, but the number of parameters is so large that dedicated APIs would need to be designed.

Another concern is that the CAM02 is somewhat outdated.

1 Like

CAM02 was improved by CAM16, but besides a new version of Rainbow created in this space, all above mentioned colormaps we are using are perceptually uniform in CAM02, while CET and Scientific Colourmaps by Fabio Crameri are devised in a much older color space (more than 40), and obviously they are not uniform in CAM02.

1 Like