-
Notifications
You must be signed in to change notification settings - Fork 756
Description
I've just seen this discussion and this PR by @dbaron about an error in the calculations for color-mix(red, yellow 65%) and noticed something else: The calculations are done as if this means 65% red and 35% yellow.
However, it is not defined anywhere which color the percentage applies to. This is all that I can see mentioned about the <number-percentage>:
When a plain number or percentage is specified (without a color-adjuster), it applies to all color channels in the given colorspace equally.
If the plain number or percentage is omitted, it defaults to 50% (an equal mix of the two colors).
I think it would make much more sense to have it apply to the color it's closer to, i.e. yellow. Not only is this easier to read and more natural, but it also extends nicely to multiple colors, which we're already discussing In fact, we should allow either or both colors to have a percentage (and normalize accordingly if it doesn't add up to 100%). Actually, @una in this thread used such a syntax naturally, which is another indication it would be user friendly.
If co-editors @svgeesus @una @argyleink agree, I could make the change.
PS: While we're at it, do we really need a <number-percentage>? All examples I've seen everywhere, including ours use a percentage. It's very confusing to have numbers that mean percentages, but don't have a % sign, and there's no reason to. Am I missing something?