(color: string)
| 6 | const NamedColorRegex = /^[a-z]+$/i; |
| 7 | |
| 8 | function 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 | |
| 15 | function getCssColorType(color: string): string { |
| 16 | const normalizedColor = color.toLowerCase(); |