W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-color-5] What's the use case for color-mix() per-component adjusters? (#5192)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 Jun 2020 20:09:08 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-642902270-1591906147-sysbot+gh@w3.org>
We've got one example from the forced-color-adjust that we discussed on a previous call - taking the alpha from an arbitrary author-specified color and transferring it onto a system color.  This can't be done with `color-adjust()`.

Other possible use-cases seem like they'd be in a similar space - taking one color as reference, make other colors have the same chroma and/or lightness while preserving their hue. These can possibly be done with `color-adjust()`, tho, if it's instead a case of "set these colors to a particular chroma/lightness" rather than specifically matching a reference color, but I can def see potential cases for the reference-color case.  For example, specifying a primary color for a button, then letting the site's accent colors adjust to similar c+l (and then using `color-adjust()` *as well* to make them a little lighter/darker/etc so they serve as accent colors.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5192#issuecomment-642902270 using your GitHub account
Received on Thursday, 11 June 2020 20:09:10 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:09 UTC