Relative colors
Newly available since 2024-07-09
The from
keyword for color functions (color()
, hsl()
, oklch()
, etc.) creates a new color based on a given color by modifying the values of the input color. Also known as relative color syntax (RCS).
To learn more, see
Using relative colors at MDN.
Compatibility (view on caniuse.com)
- Chrome 119 Released on 2023-10-31
- Chrome Android 119 Released on 2023-10-31
- Edge 119 Released on 2023-11-02
- Firefox 128 Released on 2024-07-09
- Firefox for Android 128 Released on 2024-07-09
- Safari 16.4 Released on 2023-03-27
- Safari on iOS 16.4 Released on 2023-03-27