Skip to content

Cannot convert 255 bit RGB to L*a*b* #1270

Answered by nick-shaw
ReidWeb asked this question in Q&A
Discussion options

You must be logged in to vote

I have to admit, being a control freak I like to keep manual control of the steps, and not use the combined convert() function. If I do that I get:

>>> colour.models.RGB_COLOURSPACE_sRGB.use_derived_matrix_RGB_to_XYZ=True
>>> RGB = np.array([103, 103, 103])
>>> RGB_lin = colour.cctf_decoding(RGB/255, 'sRGB')
>>> M = colour.models.RGB_COLOURSPACE_sRGB.matrix_RGB_to_XYZ
>>> XYZ = colour.algebra.vector_dot(M, RGB_lin)
>>> colour.XYZ_to_Lab(XYZ)
array([ 43.60007373,   0.        ,   0.        ])

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ReidWeb
Comment options

@ReidWeb
Comment options

Comment options

You must be logged in to vote
2 replies
@ReidWeb
Comment options

@ReidWeb
Comment options

Answer selected by ReidWeb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants