Using color-mix() to create opacity variants Published on March 31, 2023 Updated on April 2, 2023 A few weeks ago, Adam Wathan posted a tweet asking if you could use color-mix() to adjust the opacity of a color. I replied that this is what relative color syntax was essentially created to do, but Adam Argyle pointed out that it can indeed be done with color-mix() using a clever hack. CSS color-mix(
![una.im | Using color-mix() to create opacity variants](https://cdn-ak-scissors.b.st-hatena.com/image/square/03fc969e7b2c7c6bde7dd3e667ce13076b83b06b/height=288;version=1;width=512/https%3A%2F%2Funa.im%2Fposts%2Fcolor-mix-alphas%2Fog-image.jpg)