Skip to content

Commit 834433a

Browse files
committed
[css-color-4][css-color-5] Define absolute colors in prose, w3c#9555
1 parent b0660ee commit 834433a

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

css-color-4/Overview.bs

+16-8
Original file line numberDiff line numberDiff line change
@@ -915,14 +915,22 @@ Representing Colors: the <<color>> type</h2>
915915
Colors in CSS are represented by the <dfn export><<color>></dfn> type:
916916

917917
<pre class='prod'>
918-
&lt;color> = <<absolute-color-base>> | currentcolor | <<system-color>> <!-- | <<device-cmyk()>> -->
919-
920-
<dfn export>&lt;absolute-color-base></dfn> = <<hex-color>> | <<absolute-color-function>> | <<named-color>> | transparent
921-
<dfn export>&lt;absolute-color-function></dfn> = <<rgb()>> | <<rgba()>> |
922-
<<hsl()>> | <<hsla()>> | <<hwb()>> |
923-
<<lab()>> | <<lch()>> | <<oklab()>> | <<oklch()>> |
924-
<<color()>>
925-
</pre>
918+
&lt;color> = <<color-base>> | currentColor | <<system-color>>
919+
920+
<dfn>&lt;color-base></dfn> = <<hex-color>> | <<color-function>> | <<named-color>> | transparent
921+
<dfn>&lt;color-function></dfn> = <<rgb()>> | <<rgba()>> |
922+
<<hsl()>> | <<hsla()>> | <<hwb()>> |
923+
<<lab()>> | <<lch()>> | <<oklab()>> | <<oklch()>> |
924+
<<color()>>
925+
</pre>
926+
927+
An <dfn export>absolute color</dfn>
928+
is a <<color>> whose computed value
929+
has an absolute, colorimetric interpretation.
930+
This means that the value is not:
931+
932+
* ''currentColor'' (which depends on the value of the 'color' property)
933+
* a <<system-color>> (which depends on the color mode)
926934

927935
The <<hsl()>>, <<hsla()>>, <<hwb()>>, <<lch()>>, and <<oklch()>> [=color functions=]
928936
are [=cylindrical polar color=] representations using a <<hue>> angle;

css-color-5/Overview.bs

+17-3
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,29 @@ Introduction {#intro}
124124
Colors in CSS are represented by the <dfn export><<color>></dfn> type:
125125

126126
<pre class='prod'>
127-
&lt;color> = <<absolute-color-base>> | currentcolor | <<system-color>> | <<device-cmyk()>> | <<color-mix()>> | <<light-dark()>>
127+
&lt;color> = <<color-base>> | currentColor | <<system-color>> | <<device-cmyk()>> | <<light-dark()>>
128128
129-
<dfn>&lt;absolute-color-base></dfn> = <<hex-color>> | <<absolute-color-function>> | <<named-color>> | transparent
130-
<dfn>&lt;absolute-color-function></dfn> = <<rgb()>> | <<rgba()>> |
129+
<dfn>&lt;color-base></dfn> = <<hex-color>> | <<color-function>> | <<named-color>> | <<color-mix()>> | transparent
130+
<dfn>&lt;color-function></dfn> = <<rgb()>> | <<rgba()>> |
131131
<<hsl()>> | <<hsla()>> | <<hwb()>> |
132132
<<lab()>> | <<lch()>> | <<oklab()>> | <<oklch()>> |
133133
<<color()>>
134134
</pre>
135135

136+
An <dfn export>absolute color</dfn>
137+
is a <<color>> whose computed value
138+
has an absolute, colorimetric interpretation.
139+
This means that the value is not:
140+
141+
* ''currentColor'' (which depends on the value of the 'color' property)
142+
* a <<system-color>> (which depends on the color mode)
143+
* <<light-dark()>> (which depends on the color mode)
144+
* <<device-cmyk()>> (which has no colorimetric basis)
145+
146+
Nor are any of those values used inside <<color-mix()>>
147+
or in relative color syntax.
148+
149+
136150

137151
<!--
138152
██ ██ ████ ██ ██

0 commit comments

Comments
 (0)