Skip to content

Commit 82c6ec2

Browse files
committed
[css-color-5] explain why first example is wrong
1 parent 5ad2d12 commit 82c6ec2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

css-color-5/Overview.bs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ Mixing colors: the ''color-mix'' function {#colormix}
9595
* mixed result is lch(77.14585 81.95 37.192)
9696
* which results in a lighter red, like a Salmon color
9797

98+
<!-- this is out of gamut, so unsuitable as a first example
99+
salmon =[77.14585, 81.95, 37.192]
100+
Array(3) [ 77.14585, 81.95, 37.192 ]
101+
102+
salmon_sRGB=LCH_to_sRGB(salmon)
103+
Array(3) [ 1.2120451417178173, 0.5158157138581139, 0.40505102735813037 ]
104+
notice the 1.21 (121%)
105+
-->
106+
98107
<!-- showing out of gamut colors next -->
99108

100109
</div>
@@ -117,7 +126,7 @@ Mixing colors: the ''color-mix'' function {#colormix}
117126
* mixed result is lch(84.6125 106.8390 40.8526)
118127
* which is a very light red (and outside the gamut of sRGB: rgb(140.4967% 51.2654% 32.6891%))
119128

120-
<!-- Maybe the first example should reslve to an in-gamut color; show out of gamut colors later? -->
129+
<!-- Maybe the first example should resolve to an in-gamut color; show out of gamut colors later? -->
121130
</div>
122131

123132
<img src="images/mix_red_yellow_lightness30.png" alt="Result of mix-color(red, yellow, lightness(30%)" />

0 commit comments

Comments
 (0)