(hex: string, hueMod: number)
| 103 | * In OOXML, hueMod multiplies the hue value. Hue wraps around at 360. |
| 104 | */ |
| 105 | export function applyHueMod(hex: string, hueMod: number): string { |
| 106 | const { r, g, b } = hexToRgb(hex) |
| 107 | const { h, s, l } = rgbToHsl(r, g, b) |
| 108 | const newH = (h * (hueMod / 100000)) % 360 |
| 109 | const rgb = hslToRgb(newH, s, l) |
| 110 | return rgbToHex(rgb.r, rgb.g, rgb.b) |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Apply hue offset (additive). |
no test coverage detected