let middleRed = new Color("rgb(100 0 0)");
let middleGreen = new Color("rgb(0 100 0)");
let mixed = middleRed.mix(middleGreen, -.2, {space: "srgb"});
let mixed2 = middleRed.mix(middleGreen, -.2, {space: "srgb-linear"});
let mixed3 = middleRed.mix(middleGreen, -.2, {space: "lch"});
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Test inherited value of currentColor is the keyword currentColor | |
"This happens at used-value time, which means that if the value is inherited, it’s | |
inherited as currentcolor, not as the value of the color property, so descendants | |
will use their own color property to resolve it." | |
*/ | |
.outer {color: red; | |
background-color: currentColor; | |
font-size: 200%; |