You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second and third arguments are the distances along the "a" and "b" axes in the Lab color space, as described in the previous section. These values are signed (allow both positive and negative values) and theoretically unbounded (but in practice do not exceed ±160).
If I had to guess, that 160 statement is referring to the Rec. 2020 range, but that value is rounded. If so, then maybe stating that it is "approximately" 160 would make clear that the value is not an exact limit.
If we are using the sRGB, Display P3, or the Adobe RGB (1998) gamut as a reference, this statement is correct. While you are in gamut, you never exceed 160.
---- lab range in srgb ----
l: [0.0, 100.0]
a: [-79.271, 93.54]
b: [-112.03, 93.394]
---- lab range in display-p3 ----
l: [0.0, 100.0]
a: [-106.539, 105.77]
b: [-115.586, 122.034]
---- lab range in a98-rgb ----
l: [0.0, 100.0]
a: [-129.084, 101.297]
b: [-113.61, 103.679]
If we are using the Rec 2020 gamut, this statement is not precisely correct, but close. Though I don't know if there are even any displays that can show this entire range. If you round that value, then 160 makes sense.
---- lab range in rec2020 ----
l: [0.0, 100.0]
a: [-160.697, 125.889]
b: [-126.243, 132.125]
If we are talking about ProPhoto, then you will definitely exceed 160, but the ProPhoto gamut exceeds even the visible spectrum, the limits of the human eye. I don't think that the 160 statement is meant to cover the ProPhoto gamut. I also doubt there would ever be a monitor developed to cover this range, as it would be impractical, since no human could see all of those colors. I think this range is purposefully not considered in the 160 statement.
The spec says
https://drafts.csswg.org/css-color-4/#specifying-lab-lch
However, there are several files in the WPT test suite where the "a" parameter exceeds the ±160 range:
The text was updated successfully, but these errors were encountered: