test(ui): the contrast guard resolves white, which the action hover tokens mix in (#5096)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,8 @@ def color(expr: str) -> tuple:
|
|||||||
return (0, 0, 0, 0.0)
|
return (0, 0, 0, 0.0)
|
||||||
if expr == "black":
|
if expr == "black":
|
||||||
return (0, 0, 0, 1.0)
|
return (0, 0, 0, 1.0)
|
||||||
|
if expr == "white":
|
||||||
|
return (255, 255, 255, 1.0)
|
||||||
if expr.startswith("#"):
|
if expr.startswith("#"):
|
||||||
h = expr[1:] if len(expr) == 7 else "".join(c * 2 for c in expr[1:])
|
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)
|
return (int(h[0:2], 16), int(h[2:4], 16), int(h[4:6], 16), 1.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user