Skip to content

Commit dfb8a21

Browse files
committed
[css-color-4] Lab/LCH/Oklab/Oklch clarifications
1 parent 2b6d233 commit dfb8a21

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

css-color-4/Overview.bs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,16 +2819,14 @@ Device-independent Colors: CIE Lab and LCH, Oklab and Oklch</h2>
28192819
<!-- But now we have Oklab so where it matters, be more specific -->
28202820

28212821
<dfn value export for="lab()">Lab</dfn> is a rectangular coordinate system
2822-
with a central Lightness axis.
2822+
with a central Lightness (L) axis.
28232823
This value is usually written as a unitless number;
2824-
for compatibility with the rest of CSS, it is written as a percentage.
2824+
for compatibility with the rest of CSS, it may also be written as a percentage.
28252825
100% means an L value of 100, not 1.0.
2826-
L=0% is deep black (no light at all)
2827-
while L=100% is a diffuse white
2826+
L=0% or 0 is deep black (no light at all)
2827+
while L=100% or 100 is a diffuse white.
28282828

2829-
Values of L greater than 100 would correspond to specular highlights,
2830-
but their precise color is undefined in this specification.
2831-
Usefully, L=50% is mid gray, by design,
2829+
Usefully, L=50% or 50 is mid gray, by design,
28322830
and equal increments in L are evenly spaced visually:
28332831
the Lab color space is intended to be <em>perceptually uniform</em>.
28342832

@@ -2889,7 +2887,7 @@ Device-independent Colors: CIE Lab and LCH, Oklab and Oklch</h2>
28892887
<!-- because Luv is not widely used nowadays, no need to say LCH(ab)
28902888
to distinguish from LCH(uv) -->
28912889

2892-
<p class="note">Note: The Lightness axis in Lab and LCH
2890+
<p class="note">Note: The L axis in Lab and LCH
28932891
is not to be confused with the L axis in HSL.
28942892
For example, in HSL, the sRGB colors blue (#00F) and yellow (#FF0)
28952893
have the same value of L (50%) even though visually, blue is much darker.
@@ -2963,11 +2961,11 @@ Device-independent Colors: CIE Lab and LCH, Oklab and Oklch</h2>
29632961
and chroma uniformity
29642962
compared to CIE LCH.
29652963

2966-
Like CIE Lab, there is a central lightness axis
2964+
Like CIE Lab, there is a central lightness L axis
29672965
which is usually written as a unitless number in the range [0,1];
29682966
for compatibility with the rest of CSS,
2969-
it is written as a percentage. 100% means an L value of 1.0.
2970-
L=0% is deep black (no light at all) while L=100% is a diffuse white.
2967+
it may be written as a percentage. 100% means an L value of 1.0.
2968+
L=0% or 0.0 is deep black (no light at all) while L=100% or 1.0 is a diffuse white.
29712969

29722970
Note: Unlike CIE Lab, which assumes adaptation to the diffuse white,
29732971
Oklab assumes adaptation to the color being defined,
@@ -3008,7 +3006,7 @@ Device-independent Colors: CIE Lab and LCH, Oklab and Oklch</h2>
30083006
</figcaption>
30093007
</figure>
30103008

3011-
Because Oklab is more perceptually uniform,
3009+
Because Oklab is more perceptually uniform than CIE Lab,
30123010
the color difference is a straightforward distance in 3D space
30133011
(root sum of squares).
30143012
Although trivial,
@@ -3073,7 +3071,7 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
30733071
parsing/color-valid-lab.html
30743072
</wpt>
30753073

3076-
The first argument specifies the CIE Lightness.
3074+
The first argument specifies the CIE Lightness, L.
30773075
This is a number between ''0%'' or 0
30783076
(representing black)
30793077
and ''100%'' or 100
@@ -3145,18 +3143,18 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
31453143
parsing/color-valid.html
31463144
</wpt>
31473145

3148-
The first argument specifies the CIE Lightness,
3146+
The first argument specifies the CIE Lightness L,
31493147
interpreted identically to the Lightness argument of ''lab()''.
31503148

3151-
The second argument is the chroma
3149+
The second argument is the chroma C,
31523150
(roughly representing the "amount of color").
31533151
Its minimum useful value is ''0'',
31543152
while its maximum is theoretically unbounded
31553153
(but in practice does not exceed ''230'').
31563154
If the provided value is negative,
31573155
it is clamped to ''0'' at parsed-value time.
31583156

3159-
The third argument is the hue angle.
3157+
The third argument is the hue angle H.
31603158
It's interpreted similarly to the <<hue>> argument of ''hsl()'',
31613159
but doesn't map hues to angles in the same way
31623160
because they are evenly spaced perceptually.
@@ -3307,17 +3305,17 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
33073305
parsing/color-valid.html
33083306
</wpt>
33093307

3310-
The first argument specifies the Oklch Lightness,
3308+
The first argument specifies the Oklch Lightness L,
33113309
interpreted identically to the Lightness argument of ''oklab()''.
33123310

3313-
The second argument is the chroma.
3311+
The second argument is the chroma C.
33143312
Its minimum useful value is ''0'',
33153313
while its maximum is theoretically unbounded
33163314
(but in practice does not exceed ''0.5'').
33173315
If the provided value is negative,
33183316
it is clamped to ''0'' at parsed-value time.
33193317

3320-
The third argument is the hue angle.
3318+
The third argument is the hue angle H.
33213319
It's interpreted similarly to the <<hue>> arguments
33223320
of ''hsl()'' and ''lch()'',
33233321
but doesn't map hues to angles in the same way.

0 commit comments

Comments
 (0)