Skip to content

Commit 44c3778

Browse files
committed
[css-color-4] Unbounded HSL, see #8444
1 parent 289b7b5 commit 44c3778

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

css-color-4/Overview.bs

+14-7
Original file line numberDiff line numberDiff line change
@@ -2032,11 +2032,12 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
20322032
and ''0%'' is a fully-unsaturated gray.
20332033
For lightness, ''50%'' represents the "normal" color,
20342034
while ''100%'' is white and ''0%'' is black.
2035+
<!-- unbounded hsl
20352036
If the saturation or lightness are less than ''0%''
20362037
or greater than ''100%'',
20372038
they are clamped to those values
20382039
at parsed-value time,
2039-
before being converted to an sRGB color.
2040+
before being converted to an sRGB color. -->
20402041

20412042
The final argument specifies the alpha channel of the color.
20422043
It's interpreted identically to the fourth argument of the ''rgb()'' function.
@@ -2072,9 +2073,10 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
20722073
</pre>
20732074
</div>
20742075

2076+
<!-- unbounded hsl
20752077
An advantage of HSL over LCH is that,
20762078
regardless of manipulation,
2077-
the result always lies inside the sRGB gamut.
2079+
the result always lies inside the sRGB gamut. -->
20782080
A disadvantage of HSL over LCH
20792081
is that hue manipulation changes the visual lightness,
20802082
and that hues are not evenly spaced apart.
@@ -4274,9 +4276,10 @@ with white point |dest-white|:
42744276
then |col2| must be [=css gamut mapped=]
42754277
so that it [=can be displayed=].
42764278

4279+
<!-- unbounded hsl
42774280
<li id="convert-hslhwb">If |dest| cannot represent [=out of gamut=] colors,
42784281
for example ''hsl'' or ''hwb'',
4279-
then |col2| must be [=css gamut mapped=].
4282+
then |col2| must be [=css gamut mapped=]. -->
42804283

42814284
<li id="convert-rectpol">If |dest-rect| is not the same as |dest|,
42824285
in other words |dest| is a <a>cylindrical polar color</a> representation,
@@ -5122,13 +5125,16 @@ CSS Gamut Mapping to an RGB Destination</h3>
51225125
which are out of gamut
51235126
of an RGB display
51245127
and thus require to be <dfn export>css gamut mapped</dfn>.
5128+
5129+
<!-- unbounded hsl
51255130
It also applies to colors being converted
51265131
to HSL or HWB, which cannot express
5127-
colors outside the sRGB gamut.
5132+
colors outside the sRGB gamut. -->
5133+
51285134
It implements a relative colorimetric intent,
51295135
and colors inside the destination gamut are unchanged.
51305136

5131-
<wpt>
5137+
<wpt ignore>
51325138
parsing/gamut-mapping.html
51335139
</wpt>
51345140

@@ -5242,9 +5248,10 @@ Sample Pseudocode for the Binary Search Gamut Mapping Algorithm with Local MINDE
52425248
<li>return |current| as the gamut mapped color</li>
52435249
</ol>
52445250

5245-
<wpt>
5251+
<!-- unbounded hsl
5252+
<wpt ignore>
52465253
parsing/gamut-mapping.html
5247-
</wpt>
5254+
</wpt> -->
52485255

52495256

52505257
<!-- color(display-p3 1 1 0)

0 commit comments

Comments
 (0)