Skip to content

Commit

Permalink
[css-color-5] Separate out the conceptual aspects of RCS from the syn…
Browse files Browse the repository at this point in the history
…tactic details. Clarify which color space the channel keywords relate to, #10191
  • Loading branch information
svgeesus committed Apr 12, 2024
1 parent 210ec19 commit be30e75
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion css-color-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,10 @@ which is rgb(52.446% 45.821% 62.953%)
Relative Color Syntax
</h2>

<h3 id="rcs-intro">
Introduction to Relative Color Syntax
</h3>

In previous levels of this specification,
the color functions could only specify colors in an absolute manner,
by directly specifying all of the color channels.
Expand All @@ -811,6 +815,15 @@ can <em>either</em> be directly specified,
or taken from the origin color
(and possibly modified with [=math functions=]).

The origin color and the relative color need not use the same color function.

All operations take part in the
[=color space=] of the [=relative color=] function;
the [=origin color=] is converted to that color space,
and [=channel keywords=]
refer to the color space of the relative color,
<em>not</em> the [=origin color=].


<wpt>
relative-currentcolor-a98rgb-01.html
Expand Down Expand Up @@ -840,7 +853,6 @@ but they all follow a common structure:

* An [=origin color=] can be specified with a ''from <<color>>'' value at the start of the function.
This includes the optional alpha channel, if specified.
* The origin color and the relative color need not use the same color function.
* If an [=origin color=] is specified,
the remaining arguments can either be specified directly, as normal,
or be specified as a <dfn>channel keyword</dfn>
Expand Down

0 comments on commit be30e75

Please sign in to comment.