From 77c7f1261a6f5d2f715ff24751e442741570ed1f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 8 Jun 2026 19:55:43 -0500 Subject: feat(theme-studio): show OKLCH and APCA readouts in the picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Perceptual-metrics Phase 2. The picker now shows a second readout row under the WCAG ratio: the OKLCH coordinates (L, C, hue°) and the signed APCA Lc against the ground color. WCAG and all three contrast tables are untouched, so APCA stays picker-only for v1. APCA Lc carries its sign convention in a tooltip and in the README: positive is dark text on a light background, negative is light text on a dark background, so a light color on dupre's dark ground reads negative. pkReadout drives the new spans from the inlined colormath functions, and a #readouttest headless guard loads dupre-blue and asserts the spans match both the live computation and the known OKLCH reference, with WCAG unchanged. --- scripts/theme-studio/README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/theme-studio/README.md') diff --git a/scripts/theme-studio/README.md b/scripts/theme-studio/README.md index e9817ab1..58ddbf81 100644 --- a/scripts/theme-studio/README.md +++ b/scripts/theme-studio/README.md @@ -51,6 +51,13 @@ Three tiers of faces, plus the palette: (saturation/value square, hue slider, palette reuse chips, live contrast readout, and an any / AA+ / AAA legibility mask). Remove, rename, reorder with arrows or drag. The colors serving as background and foreground are locked. + + The picker also shows perceptual readouts beside the WCAG ratio: the OKLCH + coordinates (lightness, chroma, hue°) and the APCA Lc contrast against the + ground color. APCA Lc is signed — positive means dark text on a light + background, negative means light text on a dark background — so a light color + on dupre's dark ground reads as a negative Lc. WCAG stays the rating used in + the syntax/UI/package tables; APCA and OKLCH are picker-only diagnostics. - **Syntax** — every font-lock / tree-sitter category (keyword, string, function, type, comment, and the rest), each with normal/bold/italic and a contrast rating. Click a category to flash its tokens in the code; click a -- cgit v1.2.3