TLDR Web Dev · ARTICLES & TUTORIALS
CSS RELATIVE COLORS
Summary from the TLDR Web Dev newsletter
CSS relative colors are a new feature that allows devs to dynamically generate colors based on existing ones. This article goes over the syntax of relative colors and provides practical visual examples, such as adjusting opacity, creating lighter or darker shades, and generating dynamic gradients. Different color spaces like hsl, lch, and oklch can also be used for use cases like having more consistent brightness and contrast.