(type: ColorType, parsed: RGBA)
| 51 | } |
| 52 | |
| 53 | export function getRegisteredColor(type: ColorType, parsed: RGBA): string | null { |
| 54 | const hex = rgbToHexString(parsed); |
| 55 | const registered = registeredColors.get(hex); |
| 56 | if (registered?.[type]) { |
| 57 | return getRegisteredVariableValue(type, registered); |
| 58 | } |
| 59 | return null; |
| 60 | } |
| 61 | |
| 62 | export function registerColor(type: ColorType, parsed: RGBA, value: string): string { |
| 63 | const hex = rgbToHexString(parsed); |
no test coverage detected