-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-color-5][css-images-4] Are these features ready to ship? #7310
Comments
The CSS Working Group just discussed The full IRC log of that discussion<TabAtkins> Topic: color functions and RCS<bkardell_> astearns: did we talk about a day to meet up next week on selectors 4? doing it on the list? <TabAtkins> jensimmons: These are all part of Interop2022, are they ready to ship? ARe specs good enough, or are they unstable? <astearns> github: https://github.com//issues/7310 <emilio> q+ <astearns> ack em <TabAtkins> emilio: I'd love to ship some of these, but there's a lot of open questions <TabAtkins> emilio: I don't think there's any complete impl of these features. <TabAtkins> emilio: WebKit implements a bunch, but doesn't support currentcolor at all. Gecko also has trouble with currentcolor. <TabAtkins> emilio: There's some question about resolution timing taht I filed last week. <TabAtkins> emilio: So don't think things are quite ready to ship yet. <TabAtkins> jensimmons: So question really is if the spec is gonna significantly change after shipping happens. <TabAtkins> jensimmons: I think your issue highlights that some things still need to be defined. Maybe we can make this a prio to finish the spec? <TabAtkins> emilio: Think that would be great. Haven't been working actively, been spending free time on it. <TabAtkins> emilio: I can tell from Firefox usage - we enabled color-mix() in trunk and it's used extensively, over a thousand uses immediately. <TabAtkins> emilio: So I think it would be great to prio. <TabAtkins> astearns: So we're at time, please put your thoughts in that issue. <TabAtkins> astearns: AGree I'd like to see one complete impl before making the decision that it's shippable. <TabAtkins> fantasai: Sounds like this isn't ready to ship *yet*, but we should try to get it there soon. <TabAtkins> emilio: What I"d love is to avoid interdependencies on these features. <TabAtkins> emilio: weinig commented that they'd prefer color-mix() to serialize with new color syntaxes unconditionally; i'm not opposed to that, but it requires us to have new colors to ship color-mix(). Makes me a little sad because it's more work to get this in the hands of authors, but they feel strongly about that. <TabAtkins> emilio: It'd be great to work out a way to minimize interdependencies so we can ship incrementally. |
Sounded to me like |
I agree with @weinig on this |
(I was on vacation for a week, sorry for the delay in responding)
Pretty stable, has not changed much recently. Depends on (not very good, but stable) WCAG 2.1 contrast algorithm. Could be updated in the future to use the WCAG 3.0 algorithm as an explicit option, but that spec is far from setled and this future upgrade should not affect shipping it now.
Little churn now the syntax has stabilized. Depends on CSS Color 4 for color interpolation, which is also pretty stable.
Also pretty stable now.
Depends on CSS Color 4 for color interpolation, which is also pretty stable.
The specs are not changing very much, mainly on points of detail or better wording. I firmly agree with these choices for Interop 2022 and hope that Chromium and Gecko are inspired to catch up to the fine implementation of these features in WebKit. |
My understanding is that the WCAG 3 algorithm is way better than the WCAG 2 algorithm, so making WCAG 3 the "opt-in" version would be kinda sad. How unstable is that algorithm itself (as opposed to WCAG 3 in general), and would it make sense to use it anyway? |
That algorithm specifically is very contentious, is still being frequently modified, and does not seem to have consensus. People are deploying (various different revisions of) it in the wild. |
I will also point out that none of the editors of Color 5 (@svgeesus, me, @argyleink, @una) have been in that call, so it seems rather weird that the maturity of our spec was discussed and decided on in our absence. The reasonable thing would have been to punt it until at least ONE editor is on the call. As Chris points out, most of these features are pretty stable, and have had experimental implementations in WebKit for a while. If you disagree, please point out specific issues, not just some general feeling. If you believe there are issues that have not been resolved but can't point to a GitHub issue, then create one! (e.g. I saw some concerns about currentColor — is there a GitHub issue about them??) |
Yes, in Safari since TP 122 so more than a year ago; and also ongoing implementation work in Gecko since Firefox 88. Both behind a flag. There is an associated Chromium issue, not clear if that means implementation is ongoing. I agree there are specific issues being discussed, in particular regarding resolving |
I think that is
which were somewhat simplified by the resolution to |
Sorry you weren't able to be there. We only talked about this for 2-3 minutes. Nothing was “decided”. I asked because we want to know if the specs are mature enough to start shipping. Really it's a two part question:
The only decision here to make (in this issue) is for each browser team to decide if they want to ship now, given the responses to these questions. Or hold for further debate and potential upcoming changes. If there are any issues left to debate or resolve, can we do so quickly? Let's remove any blockers, so we can get this technology into the hands of web developers. |
I just proposed specific text for and asked for it to be early on this week's agenda. So hopefully we can tie down the resolved form of these functions in a speedy fashion. |
@jensimmons, sorry not to have responded to your earlier email, and also to this thread until later on - I was on vacation all last week.
Yes, soon. Two browsers already have these, behind a flag, which is already giving us some CR-like implementer feedback.
These issues are impacting implementation of the features that are part of Interop 2022 so I would like to see them resolved very soon:
One outstanding "needs edits" which again, relates to Interop 2022 areas: Note that there are other issues which don't affect Interop 2022, like |
Oh and in terms of spec stability, I just kicked off horizontal review which will need to be completed before Color 5 can advance to Candidate Rec. Color 4 has already completed Horizontal Review and I expect it to move to CR fairly soon. |
Noting this comment on Bugzilla from @emilio 11 days ago:
Bug 1770616 was closed today |
Hi Chris and fantasai @svgeesus @fantasai @fantasai said:
APCA is a candidate for WCAG 3 with the @svgeesus said
I would like to address these statements, starting with the objective one, alleging frequent modification. StabilityThe rumor or claim that the APCA algorithm is being "frequently modified" are false. These demurrers claiming frequent modification are not true.The math and the base algorithm that generates the Lc contrast value HAS NOT CHANGED in well over a year. The last change to the constants and exponents was February 15th 2021And it was a subtle change from the constants in use when the WCAG 3 FPWD was released in January 2021. // 0.98G-4g base version constants 02/15/2021:
exponents = { mainTRC: 2.4, normBG: 0.56, normTXT: 0.57, revTXT: 0.62, revBG: 0.65,};
colorSpace = { sRco: 0.2126729, sGco: 0.7151522, sBco: 0.0721750,};
clamps = { blkThrs: 0.022, blkClmp: 1.414, loClip: 0.1, deltaYmin: 0.0005,};
scalers = { scaleBoW: 1.14, loBoWoffset: 0.027,
scaleWoB: 1.14, loWoBoffset: 0.027, outFactor: 100.0,}; The "changes" in the link you posted to are NOT the algorithm, they related to separate UTILITIES such as for color string parsing or doing alpha blending. Those are supporting functions for developers to assist with integration into tools. That repo, the apca-w3, was setup when I published it as an npm package, again to make integration easier for developers. It is a library of tools, but the main, contrast math, never changed, and I don't know why you'd have that impression, other than the three internet trolls that have been harassing me. But please don't listen to rumors by uninformed trolls. One of the "changes" at the request of some developers, was simply to take the string parsing and put it in its own package, such that the APCA package was only the specific items unique to APCA, that's now in a package called colorparsley. The extent of these changes was to take the stable algorithm and publish on npm. npm i apca-w3
npm i colorparsley
npm i bridge-pca Font Lookup ThoThe font lookup table(s) are separate, and part of Silver/Gold conformance guidelines, they are not the APCAlgorithm. And regardless, last year we developed a simplified conformance model to make things work "more like" WCAG 2, and it does not involve a lookup table, just a few levels:
There is a lot of discussion regarding conformance for WCAG 3, but that is not related to the APCA algorithm, rather, it is to things like "levels," or minimum font size — but that does not impact the readability contrast model that is APCA. Contentious Consensus
What makes you say this? The three trolls that have been harassing me personally have attempted to spread rumors, I'd hope that such unsupported derision would be ignored. I have never heard anything reported as an actionable or functional fault. I'm not going to get into the chain of drama, but do extend the offer of a zoom chat to answer any such questions. I do search regularly to unearth issues or complaints—the GitHub repo has been open since Sept. 2019, and early concerns have been addressed or adjusted for. Today, there has been significant growth and interest, including active development and integration into tools (the downside of which I'll get to in a moment). There have been several positive peer or third party review articles — I have yet to find a negative one, but please let me know if there is an actual reservation in terms of the functioning or use of the method. As you know this started with "thread 695" over three years ago and we worked very hard for two years in the visual contrast subgroup to develop a robust solution based on solid vision and readability science, and I've been plainly open about this, with the white papers and other documentation. Because it's been over an extended period, I realize that the information was not as ideally organized, so recently I created a catalog page of resources, articles, and documentation: git.myndex.comBut to be very concise about it: The algorithm evolved from established peer reviewed science: CIELAB, CIELUV, Fairchild's R-Lab, the Hunt model, CIECAM02, and the P.Barten contrast model, and also referencing Stevens, and plus the work of Maureen Stone (PARC, NIST), and Larry Ahrend (NASA). The readability side of things (font lookup, levels, conformance guidelines) all come from Bailey/Lovie-Kitchin's readability research, and also G. Legge. I discuss this and the relationships to critical contrast and critical size in this thread on use cases and conformance models. Errant Versions
This is annoying, and partly the fault of some Silver draft links persisting without indication that they are deprecated—another part of what appears to be some level of intentional obstructionism. I've been proactive in chasing these down, and working with developers. But I would love to hear about any tools claiming to be APCA compliant and not implementing it correctly. This is the reason I set the time limited license, as a temporary measure to reign this nonsense in—but that has consequences, as it raised (unwarranted) concerns about the openSource future of it all. WHAT HAPPENEDThe thing is Chris, APCA exploded in popularity in a way that completely caught me off guard. And it was its growing popularity that give rise to the "contentiousness"... apparently one author reviewing it told people they should "use it now" and to be absolutely clear, I had nothing to with with that statement. Nevertheless, people are tired of using something that does not work. And it's worse today, with the increasing popularity of Dark Mode, as WCAG 2 contrast math can not calculate for dark mode. The "contentiousness" you may be referring to is the concerns over early adopters and rapidly growing popularity, which might answer your comment regarding consensus. And I do have actions being taken to alleviate any concerns—hopefully having the main paper I've been working on published in the fall (ish) will resolve some of these questions. Thank you for reading Andy |
@Myndex Thanks for the clarification regarding versioning and stability. In that case, please update your readme which gives a very different impression:
(That is six days ago). If the constants are identical to 0.98G-4g base version constants 02/15/2021 then you should clearly state this, in the readme.
That change is undated, and I can't find what TRC or chromaticities you are using. Are these also in 0.98G-4g base version?
Ditto. However, regarding the substance of this issue, it seems clear that:
|
Hi Chris @svgeesus
Done. Thank you for pointing this out. And please let me know of any other concerns, misunderstandings, or rumors that have arisen here regarding APCA and related. on
|
I completely agree with the arguments presented by @Myndex - as a developer & designer, I have had WCAG 2 color contrast functions fail me numerous times in my career when attempting to create accessible experiences. Shipping an accessibility feature, like At the end of the day, contrast algorithms based on perception, like APCA, are clearly the way forward, and introducing a feature like
|
I do find this particular failing of the WCAG 2.1 algorithm to be especially troubling. |
The CSS Working Group just discussed
The full IRC log of that discussion<emilio> topic: Is color-contrast() ready to ship?<emilio> github: https://github.com//issues/7310 <chris> We believe the color-contrast() function needs significant modification to make it future-compatible and to make it work as intended, and propose deferring this feature to CSS Color Level 6 so that we can work on it without holding back the rest of CSS Color 5. <fantasai> scribe+ <fantasai> chris: Had a breakout about color-contrast(), partly prompted by an FO about using WCAG2.1's algorithm <fantasai> chris: That is known to give bad results frequently, particularly in dark mode <fantasai> chris: figures of around 40% being wrong <fantasai> chris: There's work to develop a new one, but not ready, not normatively referenced in WCAG3 <fantasai> chris: Also complaints about syntax and so on <fantasai> chris: On the one hand browsers have it working reliably, on the other hand it often give sthe wrong answer <fantasai> chris: We don't want to ship something that is interoperable, but is harmful to the Web platform <fantasai> chris: So we want to shift this to the next level <lea> q? <lea> q+ <fantasai> astearns: Any arguments for not deferring? <astearns> ack lea <fantasai> lea: I completely agree with deferring it, unfortunately <fantasai> lea: one thing from breakout we wanted feedback from implementers <fantasai> lea: breakbout was me, Chris, Adam, and fantasai <fantasai> lea: Would help if we could ship color-contrast() without a specified algorithm, could use the best available algorithm <fantasai> lea: we're concerned that implementers would be against doing something that changed over time <fantasai> https://github.com//issues/7361 <argyle> this? https://github.com//issues/7361 <fantasai> fantasai: if we went this route, could ship a subset of functionality sooner <fantasai> fantasai: but need to make some syntactic changes to make future-compatible first <chris> q+ <smfr> q+ <fantasai> astearns: I would worry slightly about defaulting to best available, and then ppl expecting current results, and then getting different results when have a better algorithm <fantasai> lea: yes, that's the worry <fantasai> chris: Yes, concern that it will continue to do what it did earlier <fantasai> chris: Also the target contrast values have different meanings depending on the contrast algorithm <fantasai> chris: so I don't think it makes sense to use a mystery algorithm that works differently later on <astearns> ack chris <fantasai> chris: it's not small progressive change, it's a major change <astearns> ack smfr <fantasai> smfr: I agree with those concerns <fantasai> smfr: also don't want push the burden of choosing algorithms to web authors <astearns> ack fantasai <emilio> fantasai: I think if we wanna push for something sooner we'd need to go for something very minimal <lea> q? <jensimmons> q+ <emilio> ... if it solves things like github labels or so then good, but everything else would need to be deferred <emilio> ... if that's something that people thing it's important (having black / white text) maybe we can have a very minimal function <fantasai> chris: even "black or white on this color", WCAG gets wrong substantially a lot of the time <fantasai> chris: I don't think it's worth doing <astearns> ack jensimmons <lea> q+ <fantasai> jensimmons: it's very hard to teach authors that what they were doing with a thing earlier, and failing them, it's very hard to unteach that <fantasai> jensimmons: we might have a year of it working poorly, ppl say "this sucks, don't use it" for the next 5 years <chris> s/WCAG gets/WCAG 2.1 gets/ <fantasai> jensimmons: super hard to get people to change their habits <astearns> ack lea <fantasai> lea: I think the idea behind shipping minimal white/black is not that WCAG is good enough, but it is more likely to be able to change it <fantasai> lea: I think that was the thinking behind it <fantasai> fantasai: Yes, we would swap in better algorithm as soon as we have it <fantasai> astearns: putting aside whether to do simple version at all, sounds like we generally agree that the more complex color-contrast() function needs to be deferred <fantasai> astearns: can we resolve on that? <fantasai> RESOLVED: Move color-contrast() to CSS Color Level 6 <fantasai> astearns: I think we could continue discussing possibility of smaller subset of functionality in an issue <fantasai> astearns: but might be better to continue work on the function that we want, and put that out as quickly as we can <fantasai> chris: Now that we've resolved that, my focus is on remaining bits in Interop 2022 <fantasai> chris: color-mix(), interpolation, etc. <fantasai> chris: so let's move on to other issues |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> Topic: Ready to Ship Color Stuff<fantasai> chris: Would love to see the interpolation for gradients shipping, can we resolve and say it's ready to ship? <fantasai> chris: color-mix(), relative color syntax, and interpolation of gradients in non-RGB color spaces <fantasai> github: https://github.com//issues/7310 <fantasai> astearns: no more issues on color-mix()? <fantasai> chris: no <emilio> q+ <fantasai> astearns: relative color syntax? <fantasai> chris: No, and ppl liked it. I talked about it last week <fantasai> astearns: interpolation of gradients? <fantasai> chris: Uses the same syntax as color-mix(), "in colorspace" <fantasai> astearns: Any objections to marking these ready to go? <astearns> ack emilio <fantasai> emilio: So, color-mix() I'm fine saying current spec is shippable. We've gone through it a lot <fantasai> emilio: The gradient one is relatively straightforward, would love to sanity-check it but seems reasonable assuming interpolation token gets preserved everywhere and no fancy computed style shenanigans, just only affects rendering <fantasai> emilio: about relative color syntax, less enthusiastic because only one implementation <fantasai> emilio: and their implementation seems to have same interop concerns as color-mix() where we had differences between WebKit / gecko <fantasai> emilio: so not so sure about it ready to ship <fantasai> astearns: we should have a high bar to say ready to ship, regardless of where spec in the process <fantasai> [discussion about relative color syntax] <fantasai> emilio: keep the token in specified and computed style, only affects rendering <fantasai> emilio: if so, that seems reasonable <fantasai> emilio: I think straigthforward enough, doesn't need super deep review <fantasai> emilio: relative color syntax is trickier <fantasai> chris: gradient is doing color-mix(), just doing it in all possible percentages. It's the same calculation <fantasai> emilio: think it's probably fine. I would like more feedback on relative color syntax <fantasai> emilio: but gradient interpolation seems straightforwad <astearns> ack fantasai <emilio> scribe+ <emilio> fantasai: happy with emilio's proposal to resolve on color-mix() + gradients but not yet on relative colors <fantasai> astearns: declare color-mix() and non-rgb gradient interpolation as ready to ship <fantasai> astearns: objections? <chris> high five! <emilio> RESOLVED: color-mix() and gradient interpolation are ready to ship <fantasai> RESOLVED: colr-mix() and gradient non-sRGB interpolation are "ready to ship", add to Snapshot 2022 |
From Color 5:
From Images 4, via Color 4:
|
Thank you Chris, Lea, Fantasi, Adam, et alia @svgeesus @LeaVerou @fantasai @argyleink Thank you for taking the time to discuss this, based on all related timelines for normative changes in this area, I think deferment is the best in the interim. FlipperI see the mention of a "black/white flipper" — even that is not always trivial, as the "middle contrast" value is not "middle grey". I have a repo and a CodePen with examples/demos: Fancy Font Flipping I'd suggest the simple solution posed below, BUT flipping at a correct middle contrast would not necessarily pass WCAG 2, as the contrast center for WCAG 2 math is ~18Y ( While 18% is a decent middle for large patches of reflected colors, in the context of high spatial frequency stimuli (text) the middle contrast is substantially higher. And as result the "flip point" is higher, as we want to flip at middle contrast, which is around 34Y to 42Y. But we also find that there really is not an ideal middle, as the total contrast range of an typical sRGB display is insufficient to have both white and black text at optimum readability contrast for small fonts (like body text) at some middle point (this is assuming the Bailey/Lovie-Kitchin critical contrast and 20x contrast reserve). I.e. at 100Y we have black text, as the bg gets darker, at 42Y or so, small black text starts getting harder to read, but flipping to white isn't much help either. With a 0Y bg, we have white text, but as the bg gets brighter than 34Y ish, we're loosing readability with small text. So in this 34-42Y range, you could kinda have either black or white text, but you'd want to increase the size or weight so that it's large enough for this lowered contrast range. This discussion regards readability only which implies luminance only — Also, my statements above are directed toward columns of body text smaller than 18px. At 24px and above you can more or less say "flip point is 37Y". In this discussion I am using luminance Y and not a perceptual lightness measure deliberately: if you rest upon a single point to flip from black or white, there's no need to transit into any other space, just determine the appropriate offset for the relative luminance value, and this is useful enough for a basic pair of colors. It all gets much more tricky when you are doing 3-way and more inputs, and/or adding in hue/chroma considerations, in which case a simple flip point like this would be insufficient. And finally: as monitor peak white levels soar higher, it is desirable to not have full white anything for things you're staring directly at. Both backgrounds or text are not well presented at AS SUCH:In the present situation, even a simple B&W flipper would cause conflicts with the existing WCAG 2 guidelines, indicating again the importance of corrections there. And even a simple flipper has "bonus unexpected results" that need consideration. Thank you for reading, Andy |
Agreed, and I argued as such on the call. |
Well put.
For those not as familiar, this is the luminance Y on a 0 to 100 scale. So expressed in terms of CSS syntax, with a D65 white, that would be |
…led preference https://bugs.webkit.org/show_bug.cgi?id=242917 <rdar://97278994> Reviewed by Myles C. Maxfield. CSSWG thinks these features are ready to ship: w3c/csswg-drafts#7310 (comment) * Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml: Canonical link: https://commits.webkit.org/252716@main
…led preference https://bugs.webkit.org/show_bug.cgi?id=242917 <rdar://97278994> Reviewed by Myles C. Maxfield. CSSWG thinks these features are ready to ship: w3c/csswg-drafts#7310 (comment) * Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml: Canonical link: https://commits.webkit.org/252716@main
Re-opening since we dropped the ball on Relative Color Syntax. Jen asked about RCS in the initial post in this issue; there was a brief discussion on May 25 but nothing was decided as none of the editors were on the call. Interop2022 is considering dropping it because of lack of signals from CSSWG. |
There wasn't a resolution that it was not ready. Nor was there a resolution that it was ready. I re-opened the issue because the question you asked didn't really get much discussion nor a clear resolution. There was a passing mention by @emilio that there was only one implementation (in WebKit) and they "would like more feedback on relative color syntax". Maybe there is more feedback. There aren't open issues. Maybe issues need to be filed? |
I was working on color-contrast() in chromium and I'm wondering what the status is to change/ship it. It seems like there was some feedback about color-contrast earlier in this issue which I didn't closely follow. Have there been any other issues created to talk about color-contrast? Is the consensus to get rid of it...? |
Please refer to #7553, which is a meta/umbrella issue for all |
The summary being: No, please don't implement this, the spec is very much in flux, but hopefully we should have an implementable subset soon. |
Closing since all the listed features are now either:
|
How finished are the specifications for these features?
From Color 5:
From Images 4:
They are currently part of Interop 2022... can browsers ship them? Or are the specs still changing too much?
The text was updated successfully, but these errors were encountered: