Skip to content

Commit a8b37be

Browse files
committed
[css-color-4] Move definitions to terminology section, fix #6758
1 parent 0f933f3 commit a8b37be

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

css-color-4/Overview.bs

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,43 @@ Value Definitions</h3>
425425
</tr>
426426
</table>
427427

428+
429+
A color in CSS is either an <dfn export>invalid color</dfn>,
430+
as described below for each syntactic form,
431+
or a [=valid color=].
432+
433+
Any color which is not an [=invalid color=] is a <dfn export>valid color</dfn>.
434+
435+
A color may be a [=valid color=]
436+
but still be outside the range of colors
437+
that can be produced by an output device
438+
(a screen, projector, or printer)
439+
or the range of colors that may be represented by a given color model
440+
(for example HSL or HWB).
441+
It is said to be <dfn export>out of gamut</dfn>.
442+
443+
444+
Each [=valid color=] is either <dfn export>in-gamut</dfn>
445+
for a particular output device (screen, or printer) or color space,
446+
or it is [=out of gamut=].
447+
448+
<div class="example" id="ex-oog">
449+
For example, given a screen which covers 100% of the display-p3 color space,
450+
but no more, the following color is out of gamut:
451+
<pre>
452+
<span class="swatch oog" style="--color: rgb(100% 49.562% 17.429%)"></span> color(prophoto-rgb 0.88 0.45 0.10)
453+
</pre>
454+
because, expressed in display-p3,
455+
one or more coordinates are either greater that 1.0 or less than 0.0:
456+
<pre>
457+
<span class="swatch oog" style="--color: rgb(100% 49.562% 17.429%)"></span> color(display-p3 1.0844 0.43 0.1)
458+
</pre>
459+
This color is valid,
460+
and could, for example, be used as a gradient stop,
461+
but would need to be <a>CSS gamut mapped</a> for display,
462+
producing a similar-looking but lower chroma (less saturated) color.
463+
</div>
464+
428465
<!--
429466
███ ████████ ████████ ██ ██ ██ ████ ██ ██ ██████
430467
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██
@@ -3430,22 +3467,9 @@ Specifying Predefined Colors: the ''color()'' function</h3>
34303467

34313468
The color function takes parameters specifying a color, in an explicitly listed color space.
34323469

3433-
It represents either an <dfn export>invalid color</dfn>, as described below,
3470+
It represents either an [=invalid color=], as described below,
34343471
or a [=valid color=].
34353472

3436-
Any color which is not an [=invalid color=] is a <dfn export>valid color</dfn>.
3437-
3438-
A color may be a [=valid color=]
3439-
but still be outside the range of colors
3440-
that can be produced by an output device
3441-
(a screen, projector, or printer).
3442-
It is said to be <dfn export>out of gamut</dfn>
3443-
for that color space.
3444-
3445-
3446-
Each [=valid color=] is either in-gamut for the output device (screen, or printer),
3447-
or it is [=out of gamut=].
3448-
34493473
The parameters have the following form:
34503474

34513475
* An <<ident>> denoting
@@ -3464,7 +3488,7 @@ Specifying Predefined Colors: the ''color()'' function</h3>
34643488

34653489
An out of gamut color has component values
34663490
less than 0 or 0%, or greater than 1 or 100%.
3467-
These are not invalid and are retained for intermediate computations;
3491+
These are not invalid, and are retained for intermediate computations;
34683492
instead, for display, they are
34693493
<a>css gamut mapped</a> using a relative colorimetric intent
34703494
which brings the values

0 commit comments

Comments
 (0)