@@ -20,6 +20,12 @@ spec:css-color-4; type:dfn; text:colorspace
2020spec:css-color-4; type:dfn; text:gamut
2121</pre>
2222
23+ <style>
24+ .swatch {display: inline-block; height: 1.2em; width: 1.2em;}
25+ .peru {background-color: peru;}
26+ .darkperu {background-color: rgb(57.58%, 32.47%, 3.82%);}
27+ </style>
28+
2329Introduction {#intro}
2430=====================
2531
@@ -188,18 +194,18 @@ Adjusting colors: the ''color-adjust'' function {#coloradjust}
188194 </pre>
189195
190196 <div class="example">
191- This example produces the adjustment of red ,
197+ This example produces the adjustment of peru (#CD853F) ,
192198 in ''lch()'' colorspace (the default),
193- with the lightness being increased by 30 %.
199+ with the lightness being reduced by 20 %.
194200 The chroma and hue of red are left unchanged.
195201
196- <pre class="lang-css"> adjust-color(red , lightness(30 %));</pre>
202+ <pre class="lang-css"> adjust-color(peru , lightness(-20 %));</pre>
197203
198204 The calculation is as follows:
199- * sRGB red (#F00) is lch(54.2917 106.8390 40.8526 )
200- * adjusted lightness is 54.2917 + 30 = 84.2917
201- * adjusted result is lch(84.2917 106.8390 40.8526 )
202- * which is a light red color: rgb(218.5126% 218.5197% 218.4963%)
205+ * peru (#CD853F) <span class="swatch peru"> </span> is lch(62.2532% 54.0114 63.6769 )
206+ * adjusted lightness is 62.2532% - 20% = 42.2532%
207+ * adjusted result is lch(42.2532% 54.0114 63.6769 )
208+ * which is rgb(57.58%, 32.47%, 3.82%) <span class="swatch darkperu"> </span>
203209 </div>
204210
205211<img src="images/adjust_red_lightness30.png" alt="Result of adjust-color(red, lightness(30%)" />
0 commit comments