Skip to content

Commit cdf3968

Browse files
committed
[css-color-4] Update grammar, trim mentions of custom colorspaces
1 parent 9a65fb6 commit cdf3968

1 file changed

Lines changed: 17 additions & 23 deletions

File tree

css-color-4/Overview.bs

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,8 +3406,20 @@ Profiled, Device-dependent Colors</h2>
34063406
(rather than the implicit sRGB color space that most of the other color functions operate in).
34073407
Its syntax is:
34083408

3409-
<pre class='prod'>
3409+
<!-- <pre class='prod'>
34103410
<dfn>color()</dfn> = color( [<<ident>> | <<dashed-ident>>] [<<number-percentage>> | none]+ [ / [<<alpha-value>> | none] ]? )
3411+
</pre> -->
3412+
3413+
<!-- this one from Color 5,
3414+
then cut down to remove color 5-specific bits
3415+
like RCS and custom colors
3416+
-->
3417+
<pre class='prod'>
3418+
<dfn>color()</dfn> = color( <<colorspace-params>> [ / <<alpha-value>> ]? )
3419+
<dfn>colorspace-params</dfn> = [ <<predefined-rgb-params>> | <<xyz-params>>]
3420+
<dfn>predefined-rgb-params</dfn> = <<predefined-rgb>> [ <<number>> | <<percentage>> | none ]{3}
3421+
<dfn>predefined-rgb</dfn> = srgb | display-p3 | a98-rgb | prophoto-rgb | rec2020
3422+
<dfn>xyz-params</dfn> = xyz [ <<number>> | none ]{3}
34113423
</pre>
34123424

34133425
<!-- check this test, remove any fallback testing -->
@@ -3441,39 +3453,21 @@ Profiled, Device-dependent Colors</h2>
34413453

34423454
The parameters have the following form:
34433455

3444-
* An <<ident>> or <<dashed-ident>> denoting the color space.
3445-
If this is an <<ident>> it denotes one of the <a href="#predefined">predefined color spaces</a>
3446-
(such as ''display-p3'');
3447-
if it is a <<dashed-ident>> it denotes a custom
3448-
color space, defined by a ''@color-profile'' rule.
3456+
* An <<ident>> denoting
3457+
one of the <a href="#predefined">predefined color spaces</a>
3458+
(such as ''display-p3'')
34493459
Individual <a href="#predefined">predefined color spaces</a>
34503460
may further restrict whether <<number>>s or <<percentage>>s
34513461
or both, may be used.
34523462

34533463
If the <<ident>> names a non-existent color space
34543464
(a name that does not match one of the <a href="#predefined">predefined color spaces</a>),
3455-
or a predefined but unsupported color space,
3456-
this argument represents an <a>invalid color</a>.
3457-
3458-
If the <<dashed-ident>> names a non-existent color space
3459-
( a name that does not match an <a>color profile's</a> name,
3460-
or which matches but the corresponding profile has not loaded,
3461-
or does not represent a valid profile),
34623465
this argument represents an <a>invalid color</a>.
34633466

34643467

34653468
* One or more <<number>>s or <<percentage>>s providing the parameter values that the color space takes.
34663469

3467-
For custom color spaces,
3468-
specified component values
3469-
less than 0 or 0%, or greater than 1 or 100%
3470-
are not invalid;
3471-
they are clamped to the valid range at computed value time.
3472-
This is because ICC profiles typically do not accept
3473-
out of range input values.
3474-
3475-
For predefined color spaces,
3476-
specified component values
3470+
Specified component values
34773471
less than 0 or 0%, or greater than 1 or 100%
34783472
are not invalid;
34793473
these out of gamut colors

0 commit comments

Comments
 (0)