MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / isValidCssColor

Function isValidCssColor

frontend/util/color-validator.ts:8–13  ·  view source on GitHub ↗
(color: string)

Source from the content-addressed store, hash-verified

6const NamedColorRegex = /^[a-z]+$/i;
7
8function isValidCssColor(color: string): boolean {
9 if (typeof CSS == "undefined" || typeof CSS.supports != "function") {
10 return false;
11 }
12 return CSS.supports("color", color);
13}
14
15function getCssColorType(color: string): string {
16 const normalizedColor = color.toLowerCase();

Callers 1

validateCssColorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected