(value: string)
| 31 | } |
| 32 | |
| 33 | export function normalizeOpaqueHexColor(value: string) { |
| 34 | const normalized = normalizeHexColor(value); |
| 35 | if (!normalized || normalized.length !== 7) return null; |
| 36 | return normalized; |
| 37 | } |
| 38 | |
| 39 | export function hexToRgb(hex: string): [number, number, number, number] | null { |
| 40 | const normalized = normalizeHexColor(hex); |
no test coverage detected