@@ -118,13 +118,17 @@ the mixing is done in the ''lch'' colorspace.
118
118
The [=xyz=] colorspace is CIE XYZ, with a D50 whitepoint, and allows computation to be done
119
119
in a linear-light-intensity space.
120
120
121
- When a percentage is specified (without a [=color-adjuster=] ),
122
- it is expanded to all adjusters available for the given [=colorspace=] plus alpha.
121
+ Arguments are normalized as follows:
123
122
124
- If the percentage is omitted and there are no adjusters present,
123
+ - When a percentage is specified without any [=color-adjuster=] s,
124
+ it is expanded to all adjusters available for the given [=colorspace=] plus alpha.
125
+ - If the percentage is omitted and there are no adjusters present on any color arguments,
125
126
it defaults to 50% (an equal mix of the two colors).
127
+ - If only some adjusters are present, the remaining ones default to 0% (i.e. the corresponding components are taken from the first color).
128
+ - If the sum of corresponding adjusters across all colors is not 100%, percentages are scaled proportionally so that the sum is exactly 100%.
126
129
127
- Issue: If an adjuster is specified without a percentage, what does its percentage default to?
130
+ Issue: Do missing adjusters default to 0% everywhere, or only in the second color?
131
+ If the former, we can end up with adjusters that sum to 0% pretty easily.
128
132
129
133
The meaning of the adjusters is defined by colorspace.
130
134
For example, if the [=colorspace=] is [=hsl=] ,
@@ -133,9 +137,10 @@ if the colorspace is [=lch=],
133
137
lightness means the LCH Lightness, which is the same as Lab lightness,
134
138
but different to the HSL Lightness.
135
139
140
+ Issue: If an adjuster is specified without a percentage, what does its percentage default to?
141
+
136
142
Only the [=color-adjuster=] s defined for a given [=colorspace=] are available.
137
- For example,
138
- it is not possible to use the HWB [=whiteness=] adjuster unless the colorspace is [=hwb=] .
143
+ For example, it is not possible to use the HWB [=whiteness=] adjuster unless the colorspace is [=hwb=] .
139
144
The alpha adjuster is available on any color space.
140
145
141
146
If the specified colorspace has a smaller gamut
0 commit comments