lighten
functionLighten a color by a percentage. Works in HSL space for perceptually uniform results.
Import
import { lighten } from '@modular/sdk';Notes
- returns
- The lightened color as hex or rgba string
- throws
- Error if the color format is invalid or amount is out of range
- example
- ```ts lighten('#000000', 50) // => '#808080' lighten('#0000ff', 30) // => '#4d4dff' ```