web: a visible edge on dark-mode buttons, and label colours held legible !217

merged merged by cmc on 2026-09-04 02:42 UTC · krz/gitbay:chip-contrast into main

Discussion

cmc

--fill stayed #0000f0 in dark and buttons had no border, so a button's boundary on #0a0a0a was about 1.3:1 against the 3:1 WCAG 1.4.11 asks of non-text contrast. Buttons now carry a 1px --fill-edge: transparent in light, where the fill is its own boundary, and a lighter blue in dark.

A stored label colour was used as chip text as given, so a user-set #ffff00 was unreadable on white. clampChip holds the colour's relative luminance between 0.12 and 0.28, where it clears 3:1 against white and against the dark ground alike and where the palette's eight colours already sit, so they pass through unchanged; the hue is kept and the channels are scaled in linear light. TestClampChip checks the palette passes and six bad inputs come back above 3:1 on both grounds.

Stacked on !216; no code dependency.

Closes #120

retargeted from markdown-anchors to main: !216 merged

2026-09-04 02:42 UTC