You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to WCAG’s Success Criterion 1.4.3, text should have a contrast ratio of at least 4.5, while large text (which starts at around 24px or 18.67px bold) should have a contrast ratio of at least 3.
Although we cannot statically detect all cases of bad contrast (we cannot even predict what font size will be used, given browser zooming settings), we can detect the worst cases (ratio below 3), and maybe additionally warn for values below a configurable threshold (say, 2.5).
According to WCAG’s Success Criterion 1.4.3, text should have a contrast ratio of at least
4.5
, while large text (which starts at around24px
or18.67px
bold) should have a contrast ratio of at least3
.Although we cannot statically detect all cases of bad contrast (we cannot even predict what font size will be used, given browser zooming settings), we can detect the worst cases (ratio below
3
), and maybe additionally warn for values below a configurable threshold (say,2.5
).The formulas are here: https://w3c.github.io/wcag/understanding/contrast-minimum.html#dfn-contrast-ratio Here's the implementation in Chrome DevTools: https://source.chromium.org/chromium/chromium/src/+/master:third_party/devtools-frontend/src/front_end/common/ColorUtils.js;l=72-86;drc=91403e7b5c9ae2717db9243d177f8644d0d712be
The text was updated successfully, but these errors were encountered: