(value: string | null | undefined)
| 62 | } |
| 63 | |
| 64 | export function isSupportedColorValue(value: string | null | undefined): boolean { |
| 65 | const normalized = normalizeThemeColor(value); |
| 66 | if (!normalized) return false; |
| 67 | if (HEX_COLOR_PATTERN.test(normalized)) return true; |
| 68 | if (isCssVariableColor(normalized)) return true; |
| 69 | if (CSS_COLOR_FUNCTION_PATTERN.test(normalized)) return true; |
| 70 | |
| 71 | return false; |
| 72 | } |
| 73 | |
| 74 | export function colorWithAlpha(value: string, alpha: number): string { |
| 75 | const normalized = normalizeThemeColor(value); |
no test coverage detected