test(ui): the contrast guard resolves white, which the action hover tokens mix in (#5096)
CI / lint (push) Successful in 4s
CI / integration (push) Successful in 55s
CI / unit (push) Successful in 1m35s
CI / publish (push) Successful in 1m38s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 19:32:52 -04:00
co-authored by Claude Opus 5.5
parent bf339ed28c
commit de84b2554a
+2
View File
@@ -52,6 +52,8 @@ def color(expr: str) -> tuple:
return (0, 0, 0, 0.0)
if expr == "black":
return (0, 0, 0, 1.0)
if expr == "white":
return (255, 255, 255, 1.0)
if expr.startswith("#"):
h = expr[1:] if len(expr) == 7 else "".join(c * 2 for c in expr[1:])
return (int(h[0:2], 16), int(h[2:4], 16), int(h[4:6], 16), 1.0)