(rgba: RgbaColor, amount: number)
| 3 | import { clamp } from "../helpers"; |
| 4 | |
| 5 | export const saturate = (rgba: RgbaColor, amount: number): HslaColor => { |
| 6 | const hsla = rgbaToHsla(rgba); |
| 7 | |
| 8 | return { |
| 9 | h: hsla.h, |
| 10 | s: clamp(hsla.s + amount * 100, 0, 100), |
| 11 | l: hsla.l, |
| 12 | a: hsla.a, |
| 13 | }; |
| 14 | }; |
no test coverage detected
searching dependent graphs…