MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / isSupportedColorValue

Function isSupportedColorValue

src/utils/themeColors.ts:64–72  ·  view source on GitHub ↗
(value: string | null | undefined)

Source from the content-addressed store, hash-verified

62}
63
64export 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
74export function colorWithAlpha(value: string, alpha: number): string {
75 const normalized = normalizeThemeColor(value);

Callers 3

validatePrioritiesMethod · 0.90
validateStatusesMethod · 0.90

Calls 2

normalizeThemeColorFunction · 0.85
isCssVariableColorFunction · 0.85

Tested by

no test coverage detected