- From: Theresa O'Connor via GitHub <sysbot+gh@w3.org>
- Date: Thu, 30 Jan 2025 21:20:04 +0000
- To: public-css-archive@w3.org
hober has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-color] We should consider addressing different use cases contemplated for contrast-color() with separate CSS functions == There are a number of different use cases & requirements for "please give me a color that contrasts with this/these other color(s)" functions, but given the differences between these use cases, perhaps they'd best be addressed with additional color functions. 1. "Given this color, please compute a different color for me that contrasts with it." Variations of this include distinguishing between "this is intended for foreground text v. a background under text" and some threshold of sufficient contrast (WCAG, for instance, has 3 different thresholds for different situations). 2. "Given a color and a set of colors, tell me which color from that set maximally contrasts" (same fore/background and threshold variations as in (1), but the key difference here is that the author provides a set of colors and there's a guarantee that the returned color will be from that set) 3. "Given a pair of colors, tweak one or both of them the minimum amount to get the contrast 'good enough'" (same fore/background and threshold variations) 4. Contrasting color over an unknown background (e.g. an image) Two relevant personas: 1. Maintainer of existing, small/medium (not Google-scale) website(s) who want to improve legibility/a11y without messing with the existing design much 2. Designer at company with very particular and exact brand guidelines who can only use colors from a pre-defined set @cookiecrook @fantasai Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11619 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 30 January 2025 21:20:05 UTC