color-mix
The color-mix() functional notation takes two <color> values and returns the result of mixing them in a given colorspace by a given amount.
color-mix(method, color1[ p1], color2[ p2])
- method - The method is the <color-interpolation-method>, including the color space preceded by in, optionally followed by a <hue-interpolation-method>.
- color1, color2 - <color> values to mix.
- p1, p2 - <percentage> values between 0% and 100%, specifying the amount of each color to mix.
p1, p2 are normalized as follows:
- If both p1 and p2 are omitted, then p1 = p2 = 50%.
- If p1 is omitted, then p1 = 100% - p2.
- If p2 is omitted, then p2 = 100% - p1.
- If p1 = p2 = 0%, the function is invalid.
- If p1 + p2 ≠ 100%, then p1' = p1 / (p1 + p2) and p2' = p2 / (p1 + p2), where p1' and p2' are the normalization results.