Skip to content

Different Lab implementations? #501

Answered by facelessuser
seanmrich asked this question in Q&A
Discussion options

You must be logged in to vote

When I create a Lab color in color.js using Color("lab", [0, 125, 125]), I get full black. Conversions to other color spaces also result in black. However, in other tools this color produces a maroon red.

There are inconsistencies across browsers currently. Colors outside of the display gamut must be gamut mapped to the displayable gamut, and depending on the rules the browser is following, this could be different.

In the CSS spec, at one time, it was mentioned when lightness is 0% or 100% that the a and b were powerless, I think that was later removed in favor of letting gamut mapping take care of putting the color into gamut. Some browsers may follow this rule though.

Then there is th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@seanmrich
Comment options

Answer selected by seanmrich
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