MCPcopy
hub / github.com/google-labs-code/design.md / isValidColor

Function isValidColor

packages/cli/src/linter/model/spec.ts:160–162  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

158 * Validate a hex color string. Accepts #RGB, #RGBA, #RRGGBB, and #RRGGBBAA.
159 */
160export function isValidColor(raw: string): boolean {
161 return parseCssColor(raw) !== null;
162}
163
164/**
165 * Validate a dimension string uses a spec-standard unit (px or rem only).

Callers 3

spec.test.tsFile · 0.85
executeMethod · 0.85
parseTypographyFunction · 0.85

Calls 1

parseCssColorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…