Skip to content

Commit 67a8d96

Browse files
committed
[css-color-4] Add lab to color function, solves #4649
1 parent 3accc12 commit 67a8d96

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

css-color-4/Overview.bs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,19 @@ Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'',
23662366

23672367
<dt><dfn>lab</dfn>
23682368
<dd>
2369-
The ''lab'' [[!SRGB]] colorspace accepts three numeric parameters,
2369+
The ''lab'' [[CIELAB]] colorspace accepts one percentage and two numeric parameters,
2370+
representing the L, a, and b values.
2371+
The meaning and valid ranges are <a href="#specifying-lab-lch">the same as the lab() function</a>.
2372+
2373+
<div class="example">
2374+
These are exactly equivalent:
2375+
2376+
<pre>
2377+
<span class="swatch" style="--color: rgb(38.29% 67.27% 93.85%)"></span> lab(67.5345% -8.6911 -41.6019);
2378+
<span class="swatch" style="--color: rgb(38.29% 67.27% 93.85%)"></span> color(lab 67.5345% -8.6911 -41.6019);
2379+
</pre>
2380+
</div>
2381+
23702382
</dl>
23712383

23722384
<h4 id="predefined-to-lab">

0 commit comments

Comments
 (0)