Merge pull request #630 from pbakaus/fix/592-oklch-parseanycolor

Fix: parse oklch in visual-contrast and neon-text (#592)
This commit is contained in:
Abdul Wahab
2026-08-24 04:26:19 +05:00
committed by GitHub
6 changed files with 102 additions and 11 deletions
+1 -1
View File
@@ -2748,7 +2748,7 @@ function checkElementAIPaletteDOM(el) {
}
// Check for neon text (vivid cyan/purple color on dark background)
const textColor = parseRgb(style.color);
const textColor = parseRgb(style.color) || parseAnyColor(style.color);
if (textColor && hasChroma(textColor, 80)) {
const hue = getHue(textColor);
const isAIPalette = (hue >= 160 && hue <= 200) || (hue >= 260 && hue <= 310);