Potential issue with CIE L*a*b colour space conversion to RGB

Hello Jim,

Is there an error in the cielab2rgb function, or is there something awry with my understanding of colour spaces?

Probably neither in this case. However the CIELAB function is a little confusing to use (one of the reasons it was not made an official colorspace yet). You need to specify a transfer function for sRGB gamma correction.

cielabColor = (53.389, 0.0, 0.0)
rgbColor = cst.cielab2rgb(cielabColor, transferFunc=cst.srgbTF)

You should get values very close to zero which should rescale to close to 0.5.

I would also recommend the colour python package for doing this stuff: https://www.colour-science.org/

1 Like