- From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
- Date: Thu, 27 Jul 2017 17:54:46 +0000
- To: public-css-archive@w3.org
I agree that these are both important use cases. In general, I think the current proposal (and @xi's suggested fixes, too) suffers from trying to fit into the `color-mod(<color>,<series of adjustments to that color>)` syntax. Would there really be any use case for fixing the contrast and _then_ adding additional adjustments in the sequence? If not, maybe it is best to use a separate function altogether, which clearly takes separate arguments for the base color and the desired color (or colors) to test against it & modify if the contrast requirement isn't met. Adding the comment I made as a tangent to #1628 (sorry for muddling the discussion): > Giana Blantin's [Sass functions show one possible API for a "fix contrast" function that might be more clear](https://codepen.io/giana/project/full/ZWbGzD). Her main `fix-contrast` method has a desired color, a color to contrast against, and a minimum contrast ratio. She then uses a Lab model to adjust the color until luminance is met, while trying to maintain the rest of the color perception. She also has a boolean method which can be used in Sass to create a switch behavior between multiple options; but pure CSS would need a more explicit function. -- GitHub Notification of comment by AmeliaBR Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1627#issuecomment-318437824 using your GitHub account
Received on Thursday, 27 July 2017 17:54:52 UTC