Skip to content

Commit b4ff5d0

Browse files
committed
[css-color-4] More precise clamping of values, helps w3c#3845
1 parent c28b88b commit b4ff5d0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

css-color-4/Overview.bs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ HSL Colors: ''hsl()'' and ''hsla()'' functions</h2>
916916
while ''100%'' is white and ''0%'' is black.
917917
If the saturation or lightness are less than ''0%''
918918
or greater than ''100%'',
919-
they are clipped to those values before being converted to an RGB color.
919+
they are clamped to those values before being converted to an RGB color.
920920

921921
The final argument specifies the alpha channel of the color.
922922
It's interpreted identically to the fourth argument of the ''rgb()'' function.
@@ -1755,9 +1755,10 @@ Specifying Lab and LCH: the lab() and lch() functional notations</h3>
17551755
similar to the lightness argument of ''hsl()''.
17561756
However, CIE Lightness <em>can</em> exceed this range on some systems,
17571757
with extra-bright whites using a lightness up to ''400''.
1758-
Values less than ''0'' must be clipped to ''0''; values greater than
1758+
Values less than ''0'' must be clamped to ''0'' at computed-value time;
1759+
values greater than
17591760
''100'' are permitted (for forwards compatibility with High Dynamic Range (HDR),
1760-
and must not be clipped.
1761+
and must not be clamped.
17611762

17621763
The second and third arguments are the distances along the "a" and "b" axises
17631764
in the Lab colorspace,
@@ -1784,7 +1785,7 @@ Specifying Lab and LCH: the lab() and lch() functional notations</h3>
17841785
while its maximum is theoretically unbounded
17851786
(but in practice does not exceed ''230'').
17861787
If the provided value is negative,
1787-
it is clamped to ''0''.
1788+
it is clamped to ''0'' at computed-value time.
17881789

17891790
The third argument is the hue.
17901791
It's interpreted identically to the <<hue>> argument of ''hsl()'',
@@ -2358,7 +2359,7 @@ Device-dependent CMYK Colors: the ''device-cmyk()'' function</h2>
23582359
These two usages are equivalent, and map to each other linearly.
23592360
Values less than 0 or 0%, or greater than 1 or 100%,
23602361
are not invalid;
2361-
instead, they are clamped to 0/0% or 1/100%.
2362+
instead, they are clamped to 0/0% or 1/100% at computed-value time.
23622363

23632364
The fifth argument specifies the alpha channel of the color.
23642365
It's interpreted identically to the fourth argument of the ''rgb()'' function.

0 commit comments

Comments
 (0)