Skip to content

Commit 1b53318

Browse files
committed
[css-color] raise issues from San Francico discussions
1 parent 49a01cf commit 1b53318

File tree

1 file changed

+42
-16
lines changed

1 file changed

+42
-16
lines changed

css-color/Overview.bs

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,8 +1591,9 @@ Device-independent Colors: Lab and LCH</h2>
15911591
</pre>
15921592

15931593
The first argument specifies the CIE Lightness, the second argument is C and the third is H.
1594-
L is constrained to the range [0, 100]. C is an unsigned number, while H is constrained
1595-
to the range [0, 360).
1594+
L is constrained to the range [0, 100]. C is an unsigned number, theoretically unbounded
1595+
(but in practice does not exceed 230).
1596+
H is constrained to the range [0, 360).
15961597

15971598
<p class="issue">Need to define handling for out of range numbers.
15981599
Clip L, wrap H? Have also seen L up to 400, specifically
@@ -1681,10 +1682,10 @@ gamut space capable of representing almost all visible real-world colors. Both a
16811682
seven-ink printer, for ProPhoto RGB, and for the P3 standard RGB space.
16821683

16831684
<pre>
1684-
color(swopc, 0, 206, 190, 77);
1685-
color(indigo, 24, 160, 86, 42, 0, 18, 31);
1686-
color(prophoto, 233, 150, 122);
1687-
color(P3, 97, 253, 36);
1685+
color(swopc, 0, 206 190 77);
1686+
color(indigo, 24 160 86 42 0 18 31);
1687+
color(prophoto, 233 150 122);
1688+
color(P3, 97 253 36);
16881689
</pre>
16891690

16901691
All but the predefined colorpace example also need a matching ''profile'' at-rule somewhere
@@ -1704,23 +1705,32 @@ gamut space capable of representing almost all visible real-world colors. Both a
17041705

17051706
The color function takes an indentifier as the first parameter, followed by as many
17061707
numerical parameters as are needed (three for an RGB colorspace, four for CMYK,
1707-
one for greyscale, and so on). The identifier is either one of the predefined spaces
1708-
(<i>P3</i> or <i>Rec2020</i>) or the name of a profile.
1708+
one for greyscale, and so on). An optional, comma-separated alpha value is also supported.
1709+
The identifier is either one of the predefined spaces
1710+
(<i>p3</i> or <i>rec2020</i>) or the name of a profile.
17091711

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

17111715
<pre class='prod'>
1712-
<dfn>color()</dfn> = color( <<ident>> , <<number>>+ )
1716+
<dfn>color()</dfn> = color( <<ident>> , <<number>>+ [, <<number>>])
17131717
</pre>
17141718

17151719
<p class="issue">How to handle cases where there are too many, or too few, numbers supplied?
17161720
Seems like ignoring extra numbers, and treating unspecified numbers ar zero, would be
17171721
the most robust?</p>
1722+
1723+
<p class="issue">Need a fallback color, as decided at San Francisco. Add after the alpha value.
1724+
Can be an sRGB fallback or indeed another color() function.</p>
1725+
1726+
<p class="issue">Need to add choice of quoted string or number+, to allow f
1727+
or named color profiles.</p>
17181728

17191729
<h3 id="predefined">Predefined colorspaces: DCI P3 and Rec.2020.</h3>
17201730

1721-
These two colorspaces are indicated by using the predefined identifiers <i>P3</i> or
1722-
<i>Rec.2020</i> in the color function. No ''<@color-profile>'' at-rule is needed; if one is
1723-
supplied, it will be ignored.
1731+
These two colorspaces are indicated by using the predefined identifiers <i>p3</i> or
1732+
<i>rec2020</i> in the color function. No ''<@color-profile>'' at-rule is needed for these
1733+
predefined names; if one is supplied, it will be ignored.
17241734

17251735
The DCI P3 [[!DCI-P3]] colorspace has the following characteristics:
17261736

@@ -1764,14 +1774,14 @@ although in practice all but the first step are linear calculations and can be c
17641774
<!-- make these steps links to the appropriate section in a calculations appendix -->
17651775
<ol><li>Convert from gamma-corrected RGB to linear-light RGB (undo gamma correction)
17661776
<li>Convert from linear RGB to CIE XYZ
1767-
<li>Convert from a D65 whitepoint (used by both P3 and Rec.2020) to the D50 whitepoint used
1777+
<li>Convert from a D65 whitepoint (used by both p3 and rec2020) to the D50 whitepoint used
17681778
in Lab, with the Bradford transform
17691779
<li>Convert D50-adapted XYZ to Lab
17701780
</ol>
17711781

17721782
<h4 id="lab-to-predefined">Converting Lab to predefined colorspaces</h4>
17731783

1774-
Conversion from Lab to P3 or Rec.2020 also requires multiple steps, and again in practice all
1784+
Conversion from Lab to p3 or rec2020 also requires multiple steps, and again in practice all
17751785
but the last step are linear calculations and can be combined.
17761786

17771787
<ol>
@@ -1799,10 +1809,18 @@ data (<dfn data-dfn-type="descriptor" for="@color-profile/src">src</dfn>, just l
17991809
''src'' in font-face.) The ''src''
18001810
descriptor takes a url() as it's value.
18011811

1812+
<p class="issue">Same-origin and CORS for src.</p>
1813+
1814+
<p class="issue">local() to use locally installed profiles. Profile stack
1815+
like font-face rather than a single url. Avoid flash of uncalibrated color.</p>
1816+
18021817
<!-- should we add a format field to this descriptor, like with font-face src? it is always ICC format
18031818
in practice, but that could change in the future. or we could add format later, once there is
18041819
a need, and make the default ICC if not specified -->
18051820

1821+
<!-- we decided in San Francisco to not allow renering intent to be specified in the CSS;
1822+
just use the rendering intent provided by the profile.
1823+
18061824
A third, optional descriptor defines the <dfn data-dfn-type="descriptor" for="@color-profile">rendering intent</dfn> to use when mapping colors
18071825
from a larger to a smaller gamut.
18081826

@@ -1878,13 +1896,21 @@ There are four values for rendering intent
18781896
pixels. Out of gamut colors should be converted to colors that have the same saturation
18791897
but fall just inside the gamut.</p> </dd>
18801898
</dl>
1881-
1882-
1899+
-->
18831900

18841901
<pre class="prod">
18851902
<dfn at-rule >FIX ME: MISSING</dfn>
18861903
</pre>
18871904

1905+
<h2 id="working-color-space">Working Color Space</h2>
1906+
1907+
<p class="issue">Resolved at San Francisco to add a working-color-space at-rule, which
1908+
affects the entire document. Compositing, interpolation, blending use this.
1909+
Initial value is sRGB. linear-sRGB, p3, rec2020, and lab were also discussed as values.
1910+
Chris to read the canvas spec to see what it does there, particularly for the
1911+
'optimal' value.</p>
1912+
1913+
18881914
<h2 id='cmyk-colors'>
18891915
Device-dependent CMYK Colors: the ''device-cmyk()'' function</h2>
18901916

0 commit comments

Comments
 (0)