I love the idea of being able to take a color you already have in CSS, like currentColor
, a custom property, or a color pulled from an attr()
, and manipulate it. The big examples being darken, lighten, or apply opacity to it for different adjacent elements or states.
We have a ton of “newly available” power in CSS with this in the form of the relative color syntax, and Ahmad’s new post about this is great. The color-mix()
function has a bit better browser support and has a good amount of overlap in what it can do, but I prefer the syntax and power of the relative color syntax.