@@ -88,32 +88,35 @@ Mixing colors: the ''color-mix()'' function {#color-mix}
88
88
89
89
90
90
<pre class='prod'>
91
- <dfn>color-mix()</dfn> = color-mix( <<color>> <<color>> [ <<number>> | <<percentage>> |
92
- [ [=color-adjuster=] [=colorspace=]? ]?] )
91
+ <dfn>color-mix()</dfn> = color-mix(<<colorspace>> ?, <<mix-component>> #{2})
93
92
</pre>
94
93
95
94
<pre class='prod'>
96
- <dfn>colorspace </dfn> = srgb | hsl | hwb | xyz | lab | lch
95
+ <dfn><mix-component> </dfn> = <<color>> [ <<percentage>> | <<color-adjuster>> + ]?
97
96
</pre>
98
97
99
98
<pre class='prod'>
100
- <dfn>color-adjuster</dfn> = <<rgb-adjuster>> | <<hsl-adjuster>> | <<hwb-adjuster>> | <<xyz-adjuster>> | <<lab-adjuster>> | <<lch-adjuster>>
101
- <dfn>srgb-adjuster</dfn> = red | green | blue
102
- <dfn>hsl-adjuster</dfn> = <<hue-adjuster>> | saturation | lightness
103
- <dfn>hwb-adjuster</dfn> = <<hue-adjuster>> | whiteness | blackness
104
- <dfn>xyz-adjuster</dfn> = x | y | z
105
- <dfn>lab-adjuster</dfn> = lightness | a | b
106
- <dfn>lch-adjuster</dfn> = lightness | chroma | <<hue-adjuster>>
107
- <dfn>hue-adjuster</dfn> = hue [shorter | longer | increasing | decreasing ]?
99
+ <dfn><colorspace></dfn> = srgb | hsl | hwb | xyz | lab | lch
100
+ </pre>
101
+
102
+ <pre class='prod'>
103
+ <dfn><color-adjuster></dfn> = <<rgb-adjuster>> | <<hsl-adjuster>> | <<hwb-adjuster>> | <<xyz-adjuster>> | <<lab-adjuster>> | <<lch-adjuster>>
104
+ <dfn><srgb-adjuster></dfn> = red || green || blue
105
+ <dfn><hsl-adjuster></dfn> = <<hue-adjuster>> || saturation || lightness
106
+ <dfn><hwb-adjuster></dfn> = <<hue-adjuster>> || whiteness || blackness
107
+ <dfn><xyz-adjuster></dfn> = x || y || z
108
+ <dfn><lab-adjuster></dfn> = lightness || a || b
109
+ <dfn><lch-adjuster></dfn> = lightness || chroma || <<hue-adjuster>>
110
+ <dfn><hue-adjuster></dfn> = hue [shorter | longer | increasing | decreasing | specified ]?
108
111
</pre>
109
112
110
113
When no [=colorspace=] is specified,
111
114
the mixing is done in the ''lch'' colorspace.
112
115
113
- When a plain number or percentage is specified (without a [=color-adjuster=] ),
116
+ When a percentage is specified (without a [=color-adjuster=] ),
114
117
it applies to all color channels in the given [=colorspace=] equally.
115
118
116
- If the plain number or percentage is omitted,
119
+ If the percentage is omitted,
117
120
it defaults to 50% (an equal mix of the two colors).
118
121
119
122
The [=xyz=] colorspace is CIE XYZ, with a D50 whitepoint, and allows computation to be done
0 commit comments