Skip to content

Commit 571fc34

Browse files
committed
[css-color] more tidying
1 parent 85434cb commit 571fc34

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

css-color/Overview.bs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,21 +1607,18 @@ Converting LCH colors to Lab colors</h3>
16071607
<h2 id='grays'>
16081608
Specifying Grays: the ''gray()'' functional notation</h2>
16091609

1610-
<p class="issue">As suggested at San Francisco, keep the syntax here but make
1611-
gray(number, alpha?) an alias to Lab with a=b=0. However, this should be
1612-
</p>
1610+
<!-- As decided at San Francisco, this syntax is an alias to Lab with a=b=0. -->
16131611

16141612
Grays are fully desaturated colors. The ''gray()'' functional notation simplifies
16151613
specifying this common set of colors, so that only a single numerical parameter
16161614
is required, and so that gray(50%) is a visual mid-gray (perceptually equidistant
16171615
between black and white).
16181616

1619-
16201617
<pre class='prod'>
16211618
<dfn>gray()</dfn> = gray( <<number>> [, <<alpha-value>>]? )
16221619
</pre>
16231620

1624-
The first argument specifies the shade of gray,
1621+
The first argument specifies the shade of gray, equal to the CIE Lightness,
16251622
while the second optional argument specifies the alpha channel of the gray.
16261623

16271624
<h3 id='gray-to-rgb'>
@@ -1631,8 +1628,9 @@ Converting gray colors to sRGB colors</h3>
16311628
but the last step are linear calculations and can be combined.</p>
16321629

16331630
<ol>
1634-
<li>Convert to D65-adapted Lab by setting L to the gray value, a and b to 0
1635-
<li>Convert Lab to (D65-adapted) XYZ (<em>No</em> Bradford transform)
1631+
<li>Convert to Lab by setting L to the gray value, a and b to 0
1632+
<li>Convert Lab to XYZ
1633+
<li> Adapt from D50 to D65 (Bradford transform)
16361634
<li>Convert from (D65-adapted) CIE XYZ to linear sRGB
16371635
<li>Convert from linear-light sRGB to sRGB (do gamma correction)
16381636
</ol>
@@ -1692,13 +1690,14 @@ The color function takes an indentifier as the first parameter, followed by as m
16921690
numerical parameters as are needed (three for an RGB colorspace, four for CMYK,
16931691
one for greyscale, and so on). An optional, comma-separated alpha value is also supported.
16941692
The identifier is either one of the predefined spaces
1695-
(<i>p3</i> or <i>rec2020</i>) or the name of a profile.
1693+
(<i>p3</i> or <i>rec2020</i>) or the name of a profile. An optional fallback may be specified
1694+
(an sRGB color, or indeed another color() function).
16961695

16971696
<pre class="issue">Decided at San Francisco to add a larger set of common predefined spaces
16981697
like AdobeRGB, ProPhoto RGB, and so on. Also coated and uncoated swop, etc, etc. </pre>
16991698

17001699
<pre class='prod'>
1701-
<dfn>color()</dfn> = color( <<ident>> , <<number>>+ [, <<number>>])
1700+
<dfn>color()</dfn> = color( <<ident>> , <<number>>+ [, <<alpha-value>>]? [, <<fallback>>]?)
17021701
</pre>
17031702

17041703
<p class="issue">How to handle cases where there are too many, or too few, numbers supplied?
@@ -1746,10 +1745,11 @@ The ITU Rec.2020 [[!Rec.2020]]
17461745
Rec.2020 transfer function has the same form as the one for sRGB, but with
17471746
the constants at higher precision to cope with 10 or 12-bit components:
17481747

1749-
<pre> E < β ? 4.5 * E : α * Math.pow(E, 0.45) - (α - 1);
1748+
<pre class="lang-javascript"> E < β ? 4.5 * E : α * Math.pow(E, 0.45) - (α - 1);
17501749
</pre>
17511750

1752-
Where α=1.09929682680944 and β=0.018053968510807 .
1751+
Where α=1.09929682680944 and β=0.018053968510807
1752+
<!-- full-precision constants here, not the rounded ones for 10 or 12bit components -->.
17531753

17541754
<h4 id="predefined-to-lab">Converting predefined colorspaces to Lab</h4>
17551755

@@ -2475,7 +2475,7 @@ Guaranteeing Adequate Contrast: the ''contrast'' adjuster</h3>
24752475
<code>((channel + 0.055) / 1.055) ^ 2.4</code>.
24762476

24772477
Note: This reverses the logarithmic power scaling of the sRGB gamut,
2478-
so the value of the channel is approximately linear related to the amount of light required to represent it.
2478+
so the value of the channel is linear with respect to the amount of light produced.
24792479

24802480
<li>
24812481
The luminance is:

0 commit comments

Comments
 (0)