Skip to content

Commit 32efde3

Browse files
committed
[css-color-5] add LCH complement example
1 parent 7bcad32 commit 32efde3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

css-color-5/Overview.bs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Status: ED
66
Group: csswg
77
TR: https://www.w3.org/TR/css-color-5/
88
ED: https://drafts.csswg.org/css-color-5/
9-
Prevous Version: https://www.w3.org/TR/2020/WD-css-color-5-20200303/
9+
Previous Version: https://www.w3.org/TR/2020/WD-css-color-5-20200303/
1010
Work Status: exploring
1111
!Delta Spec: yes
1212
Editor: Chris Lilley, W3C, chris@w3.org, w3cid 1438
@@ -583,6 +583,15 @@ When an origin color is present, the following keywords can also be used in this
583583
The result is <span class="swatch" style="--color: rgb(57.58% 32.47% 3.82%)"> </span> lch(49.80256% 54.0114 63.6769)
584584
</div>
585585

586+
<div class="example">
587+
This adds 180 degrees to the hue angle, giving the complementary color.
588+
<pre>
589+
--accent: <span class="swatch" style="--color: lightseagreen"></span> lightseagreen;
590+
--complement: <span class="swatch" style="--color: rgb(88.2814% 51.1047% 58.3039%"></span> LCH(from var(--accent) l c calc(h+180));
591+
</pre>
592+
lightseagreen is LCH(65.4937% 39.4484 190.1013), so --complement is <span class="swatch" style="--color: rgb(88.2814% 51.1047% 58.3039%)"></span> LCH(65.4937% 39.4484 370.1013)
593+
</div>
594+
586595
<div class="example">
587596
Fully desaturating a color to gray, keeping the exact same lightness:
588597

0 commit comments

Comments
 (0)