MCPcopy
hub / github.com/CapSoftware/Cap / normalizeOpaqueHexColor

Function normalizeOpaqueHexColor

apps/desktop/src/utils/hex-color.ts:33–37  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

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

Callers 4

hex-color.test.tsFile · 0.90
HexColorInputFunction · 0.90
commitValueFunction · 0.90
HexColorInputFunction · 0.90

Calls 1

normalizeHexColorFunction · 0.85

Tested by

no test coverage detected