@@ -2178,7 +2178,7 @@ Profiled, Device-dependent Colors</h2>
21782178
21792179 The color function takes one or more comma-separated arguments,
21802180 with each argument specifying a color,
2181- and later colors acting as "fallback" if an earlier color can't be displayed
2181+ and later colors acting as "fallback" if an earlier color [= can't be displayed=]
21822182 (for example, if the colorspace it specifies hasn't been loaded yet).
21832183
21842184 Each argument has the following form:
@@ -2208,12 +2208,6 @@ Profiled, Device-dependent Colors</h2>
22082208 where the additional inks are spot colors or varnishes
22092209 that most colors on the page won't use.)
22102210
2211- Values less than 0 or 0%, or greater than 1 or 100%,
2212- are not invalid; instead, they are
2213- <a>gamut-mapped</a> using a relative colorimetric intent
2214- which brings the values within the range 0/0% to 1/100%
2215- at computed-value time.
2216-
22172211 If a <<string>> is provided,
22182212 this argument represents an <a>invalid color</a> .
22192213 <dt> If the colorspace defines named colors
@@ -2233,12 +2227,60 @@ Profiled, Device-dependent Colors</h2>
22332227 using any CSS color syntax
22342228 can be provided.
22352229
2230+
22362231 The ''color()'' function represents the color
22372232 specified by the first of its arguments that represent a <dfn export>valid color</dfn>
22382233 (that is, the first argument that isn't an <dfn export>invalid color</dfn> ).
22392234 If all of its arguments represent <a>invalid colors</a> ,
22402235 ''color()'' represents <a>opaque black</a> .
22412236
2237+ A color may be a [=valid color=]
2238+ but still be outside the range of colors
2239+ that can be produced by an output device
2240+ (a screen, projector, or printer).
2241+ It is said to be <dfn export>out of gamut</dfn>
2242+ for that colorspace.
2243+
2244+ An out of gamut color has component values
2245+ less than 0 or 0%, or greater than 1 or 100%.
2246+ These are are not invalid; instead, they are
2247+ <a>gamut-mapped</a> using a relative colorimetric intent
2248+ which brings the values within the range 0/0% to 1/100%
2249+ at computed-value time.
2250+
2251+ A color which is either an [=invalid color=] or
2252+ an [=out-of-gamut=] color
2253+ <dfn export>can't be displayed</dfn> .
2254+
2255+ <div class="example">
2256+ This very intense lime color is in-gamut for rec.2020:
2257+ <pre> color(rec2020 0.42053 0.979780 0.00579);</pre>
2258+ in LCH, that color is
2259+ <pre> lch(86.6146 160.0000, 136.0088);</pre>
2260+ in display-p3, that color is
2261+ <pre> color(display-p3 -0.6112 1.0079 -0.2192);</pre>
2262+ and is out of gamut for display-p3
2263+ (red and blue are negative, green is greater than 1).
2264+ If you have a display-p3 screen, that color is:
2265+ <ul>
2266+ <li><em> valid</em></li>
2267+ <li><em> in gamut</em> (for rec.2020)</li>
2268+ <li><em> out of gamut</em> (for your display)</li>
2269+ <li> and so <em> can't be displayed</em></li>
2270+ </ul>
2271+ The color used for display will be a less intense color
2272+ produced automatically by gamut mapping.
2273+ </div>
2274+
2275+ <div class="example">
2276+ The same color as the previous example is now specified with a fallback
2277+ <pre> color(rec2020 0.42053 0.979780 0.00579, color(display-p3(0 1 0)));</pre>
2278+ On a display-p3 screen,
2279+ because the first-choice color can't be displayed
2280+ and because a fallback has been given which is in-gamut for the display,
2281+ the fallback color will be used.
2282+ </div>
2283+
22422284<h3 id="predefined">
22432285Predefined colorspaces: ''srgb'', ''display-p3'', ''a98-rgb'', ''prophoto-rgb'', ''rec2020'' and ''lab'''.</h3>
22442286
0 commit comments