Skip to content

Commit 8f2149e

Browse files
committed
[css-color-4] remove gray function as name sucks
1 parent 528acdd commit 8f2149e

File tree

1 file changed

+5
-38
lines changed

1 file changed

+5
-38
lines changed

css-color-4/Overview.bs

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Representing Colors: the <<color>> type</h2>
187187
<pre class='prod'>
188188
&lt;color> = <<hex-color>> | <<named-color>> | currentcolor | transparent
189189
<<rgb()>> | <<rgba()>> | <<hsl()>> | <<hsla()>> | <<hwb()>> |
190-
<<lab()>> | <<lch()>> | <<gray()>> |
190+
<<lab()>> | <<lch()>> |
191191
<<color()>> | <<device-cmyk()>> |
192192
<<system-color>>
193193
</pre>
@@ -247,7 +247,7 @@ Resolving <<color>> Values</h3>
247247
paired with the specified alpha channel
248248
(defaulting to opaque if unspecified).
249249

250-
: ''lab()'', ''lch()'', and ''gray()'' values
250+
: ''lab()'' and ''lch()'' values
251251
::
252252
The computed and used value
253253
is the corresponding CIE Lab color
@@ -1932,41 +1932,9 @@ Converting LCH colors to Lab colors</h3>
19321932
<li>L is the same
19331933
</ol>
19341934

1935-
<h2 id='grays'>
1936-
Specifying Grays: the ''gray()'' functional notation</h2>
1937-
1938-
Issue(290):
1939-
1940-
Grays are fully desaturated colors.
1941-
The ''gray()'' functional notation simplifies specifying this common set of colors,
1942-
so that only a single numerical parameter is required,
1943-
and so that gray(50%) is a visual mid-gray
1944-
(perceptually equidistant between black and white).
1945-
1946-
<pre class='prod'>
1947-
<dfn>gray()</dfn> = gray( <<percentage>> [ / <<alpha-value>> ]? )
1948-
</pre>
1949-
1950-
The first argument specifies the shade of gray,
1951-
equal to the CIE Lightness,
1952-
while the second optional argument specifies the alpha channel of the gray.
1953-
1954-
Note: In other words,
1955-
''gray(a% / b)'' is equal to ''lab(a% 0 0 / b)''.
1956-
1957-
<h3 id='gray-to-rgb'>
1958-
Converting gray colors to sRGB colors</h3>
1959-
1960-
Conversion from gray to sRGB requires multiple steps;
1961-
in practice all but the last step are linear calculations and can be combined.
1962-
1963-
<ol>
1964-
<li>Convert to Lab by setting L to the gray value, a and b to 0
1965-
<li>Convert Lab to XYZ
1966-
<li>Adapt from D50 to D65 (Bradford transform)
1967-
<li>Convert from (D65-adapted) CIE XYZ to linear sRGB
1968-
<li>Convert from linear-light sRGB to sRGB (do gamma encoding)
1969-
</ol>
1935+
<!-- gray() removed in #4621
1936+
https://github.com/w3c/csswg-drafts/issues/4621
1937+
-->
19701938

19711939
<h2 id='icc-colors'>
19721940
Profiled, Device-dependent Colors</h2>
@@ -2791,7 +2759,6 @@ Changes from Colors 3</h3>
27912759
Several brand new features have been added:
27922760

27932761
<ol>
2794-
<li>''gray()'' function, for specifying grays compactly.
27952762

27962763
<li>''hwb()'' function, for specifying colors in the HWB notation.
27972764

0 commit comments

Comments
 (0)