From 843bbf0848adff40714e3d7f01376dfe2f14e1dc Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 9 Jun 2026 19:05:13 -0500 Subject: feat(theme-studio): mark safe lightness in the OKLCH picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OKLCH picker gets a "safe for" selector listing the covered overlay faces. Pick one and the C×L plane shades the lightness band too light to keep that face readable over its foreground set, with the L_max ceiling as the band's lower edge. The ceiling is one marker computed via lMax at the current chroma, not a per-pixel foreground-set mask over the plane, so the existing AA/AAA mask stays single-foreground. When no foreground is dark enough to fail, the band hides; when even black can't satisfy the target, the whole plane shades. The band only shows in OKLCH mode and clears in HSV. The cursor moved above the band so it stays visible through the shade. Phase 5 of the palette-ramps spec, the last build phase. A #safetest browser gate pins that the band appears for a selected covered face with a positive height and hides when none is selected. --- scripts/theme-studio/generate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/theme-studio/generate.py') diff --git a/scripts/theme-studio/generate.py b/scripts/theme-studio/generate.py index 60520b41..a8cda815 100644 --- a/scripts/theme-studio/generate.py +++ b/scripts/theme-studio/generate.py @@ -465,10 +465,11 @@ STYLES_CSS
-
+
edit
+
safe for
-- cgit v1.2.3