saturate
functionAdjust the saturation of a color. Works in HSL space.
Import
import { saturate } from '@modular/sdk/theme';Notes
- returns
- The adjusted color as hex or rgba string
- throws
- Error if the color format is invalid or amount is out of range
- example
- ```ts saturate('#808080', 50) // Increase saturation saturate('#ff0000', -30) // Decrease saturation (desaturate) ```