Visual Perception Experiments
CE16 SAPC-6 — Algorithm Evaluation
and are intended for desktop viewing on a standard sRGB monitor.
WAI Contrast Research
"Constant Background" Series, October 2019
These are tests of the contrast measurements by the SAPC6 algorithm, luminance module, as compared to other methods. These test plots are for normal polarity (dark text on a light background, aka BoW). The series on this page is a small sampling of the test plots for discussion. Here, contrasts are all shown against the same background of #D8D8D8. The contrasts shown are SAPC levels 5%, 10%, 25%, and 40% thru 110% in 10% increments.
On Contrast Levels
The SAPC 60% level is essentially equivalent to the common 3:1 ratio that is mentioned as a minimum in many standards. Astute observers may notice that contrast levels higher than 70% may not seem "that much higher", dependent on a number of factors, including the ambient light, quality of the monitor, monitor calibration and gamma, and of course the observer's personal visual function. That these higher levels seem similar for a normal weight font is generally referred to as the contrast constancy effect. But notice (depending on monitor settings) how very thin fonts are still affected by changes in luminance contrast above 70%.
Jump To Test Patch:
These link to the brief discussion before each patch.
- Test Panel #1 at 5% Contrast
- Test Panel #2 at 10% Contrast
- Test Panel #3 at 25% Contrast
- Test Panel #4 at 40% Contrast
- Test Panel #5 at 50% Contrast
- Test Panel #6 at 60% Contrast (WCAG 3:1)
- Test Panel #7 at 70% Contrast
- Test Panel #8 at 80% Contrast (WCAG 4.5:1)
- Test Panel #10 at 100% Contrast (WCAG 7:1)
- Test Panel #11 at 110% Contrast
You can also jump to or link to any particular patch by the serial number, i.e. add a hash (#) and the serial to the URL to jump directly to a particular test patch (this is more useful in the full series of tests which don't have the clickable TOC as above). For instance, to go to test patch number CE16_D8_CBNP_7, then in the location bar add #CE16_D8_CBNP_7 to the end of the URL (click to see).
More Complete Listings
There are substantially larger test plot collections available. These other files are very large - as much as 2MB just in HTML!! For more constant background generated plots, see this page (Constant Background Ramps), where the background remains constant and only the text colors change to test perceptually uniform contrast increase increments.
For plots of constant contrast, see this page (Constant Contrast), where both the background and text change to test uniform tracking of perceptual contrast.
CONTRAST: As used on this page, mainly it means the perceived difference between two colors displayed on a computer monitor. However, it's useful to point out that “Contrast” can be used to describe the differences of other perceptions: Contrast of size, contrast of position, contrast of speed, etc.
PERCEPTION: As it happens, perception is very much a neurological activity. That is, it happens in our brain. We perceive things a certain way, but what we perceive is essentially representational and not an absolute quantity of what we're seeing, feeling, or hearing. The important understanding here, is that what we perceive is subject to our neurological system's interpretation of the physical stimuli. This is where the term “psychophysics” comes from. Partly to do with stimulus in the physical world, and partly to do with how our brain interprets it.
For example, the color "purple" is not real (purple is the perception we have when the red and blue cones in our eye are stimulated without stimulating green, but there is no spectral purple). Can you see the orange background on this screen being displayed on your computer monitor? Well it's not orange at all. It's separate red and green, stimulating the red and green receptors in your eye, in such a way that your eye/brain visual system interprets it—perceives it—as orange.
So this study of contrast, as it applies to colors that you might want to use a web design, is not just about the difference between two colors as some might think. It's about all the factors that we need to take into account for how we perceive the difference between two colors. And that includes things like spatial frequency, a practical application of which relates directly to the stroke width of a font.
POLARITY: In this context Polarity applies to the values of a background and the stimuli. In other words, is it dark text on a light background, or light text on a dark background.
BoW and/or NORMAL mode: means dark text on a light background (normal mode). Confusingly some researchers call this negative contrast, others call it positive display. I'm pushing to move toward “NORMAL” to describe black print on white (or maybe "paper mode") and then “REVERSE” to describe light text on a dark BG, which is how people often describe that.
WoB and/or REVERSE mode: means light text on a dark background (reverse mode).
WCAG: Web Content Accessibility Guidelines. In the context used here, I refer to the math used for the 1.4.3/1.4.6 contrast assessments, which is essentially just a simple ratio of luminance between two sRGB colors with a small offset.
SAPC: The “APC” stands for “Advanced Perceptual Contrast”, the “S” is either for “sRGB” or “Somers” the inventor (eh, that would be me) ... it’s SAPC either way :) ... This is Major Iteration 6. The companion project is S-LAB, an L*a*b* type colorspace designed specifically for accessibility with computer display uses.
Evaluations/discussions based on observations made by trained observer(s) using a common, calibrated sRGB display. More elaborate evaluations using a larger sample size of subjects and display types is forthcoming.
Test Panel: # D8
Constant Background and NORMAL Polarity
5% 10% 25% 40% 50% 60& 70% 80% 90% 100% 110%
SAPC-6 Values Generated: 10/28/2019
Test Generator Settings: BG sRGB: D8 ⊙ CodeInc: 0.841251095685701 ⊙ Target Contrast: 10% ⊙ sLin: 2.218 ⊙ Scl: 1.618 ⊙ FGx: 0.45 ⊙ BGx: 0.39 ⊙ Add: 2.654321 ⊙ SftClp: 0.321 ⊙ FG clmp: 0.08 ⊙ BG clmp: 0.06 ⊙ MnAdj: 0.0121 ⊙ FGoi: 0 ⊙ 0.005 ⊙ BGoi: -0.025 ⊙ 0
SAPC 6 Settings: Pol: NORMAL POLARITY ⊙ Mode: ⊙ Target Contrast: 0% ⊙ sLin: 2.218 ⊙ Scl: 1.618 ⊙ FGx: 0.45 ⊙ BGx: 0.39 ⊙ FG clmp: 0.08 ⊙ BG clmp: 0.06 ⊙ FGoi: 0.009 ⊙ 0.005 ⊙ BGoi: -0.025 ⊙ 0
5% Near Threshold
This is just a few percent above visibility threshold for normally sighted, and even then only for the very big headlines at the top such as "SAPC-6". This patch demonstrates the threshold level of contrast sensitivity function (CSF). Notice that the body text on the page is essentially invisible, but the very large bold headlines are just barely readable. This is due in part to the spatial frequency aspect of CSF.
To anyone with poor contrast sensitivity, this page may simply appear to be blank (except for the few color items each patch has for reference).
10% Slightly Above Threshold
The next patch demonstrates how someone with a severe contrast sensitivity deficit may perceive web pages with insufficient contrast. To anyone with poor contrast sensitivity, this page may simply appear to be blank (except for the few color items each patch has for reference).
This is about the threshold level of a severe CSF impairment, approximately a Pelli-Robson score of log 1 (being 10 times worse that a perfect PR score of 2). There are several large headlines using very thin fonts on this test patch - can you see them at all here? They will be more visible later.
25% Recommended “Essential Minimum”
It is useful for designers to consider anything below this level to be essentially invisible.
This patch is two and a half times higher contrast that the previous slide, yet it is still hard to read. Such a low contrast should not be used for text or other items that need to be readable. Nevertheless, this does show a reasonable minimum level for non-textural elements, such as a DIV or a page separator element.
A key here again is the spatial frequency: a contrast this low needs to be paired with large bold elements, ideally where the stroke is at least 8px wide. 8px to 19px stroke width (i.e. border width) is the ideal range for maximum detectability of an element.
40% Minimum “Big Bold Headline”
This patch demonstrates a level that some standards documents refer to as an "absolute minimum" contrast level for detection and legibility.
The only text that can reasonably go this low would be a large and very bold headline such as the “SAPC-6” at the top of the patch. Again, minimum stoke width would be 8px.
50% Large Text Minimum
It is conceivable that large (48px) normal weight (400 or 500) text could work here, and potentially bold (700+) at no less than 32px.
60% Similar to Classic or WCAG 3:1
Preliminary studies indicate this level may be suitable for thin 200 weight fonts at 72px and larger, normal weight at 36px and larger and bold at 24px and larger. Unfortunately these recommendations are hard to define due to the vast variation of font glyph design and that terms like "bold" relation to stroke width is not standardized.
Put another way, this contrast level supports a minimum stroke width of 3px.
This SAPC level is essentially equivalent to the “classic” 3:1 contrast ratio, and the similar WCAG 3:1, generally considered a minimum for text on displays.
Contrasts greater than this may appear to be perceptually the same due to contrast constancy, but notice that the very thin fonts (the 100 weight font at the bottom of the text panel) still derives benefit from
70% Small Headlines—Stroke Width 2.5px
This is a good contrast for small headlines, and incidental text. Preliminary: Minimum stroke width of 2.5px as a guiding factor, which is approximately 200 wgt @ 64px+, Normal Weight non-body Text 32px+, bold text 18px+
As mentioned in the introduction, this level contrast and higher may be perceptually the same or very similar due to contrast constancy effect. But higher spatial frequencies, i.e. very thin fonts, will still clearly benefit from higher contrasts on most displays. Also, the use of certain types of antialiasing will affect the rendered colors and require higher contrasts in terms of CSS values to compensate.
80% Similar to WCAG 4.5:1 with BG #FFF
Preliminary: Minimum stroke width of 2px as a guiding factor, which is approximately 200 weight at 36px, Normal Weight body text at 20px, bold at 12px (non-content)
Side note: 12px, even if bold, is too small for any "important content" that you actually want users to read, though non-content uses (i.e. copyright notices) are likely acceptable. 16px or larger is the recommended minimum for body text with the x-height of a 0.5 ratio (x-height of 8px).
100% Basic Body Text Contrast
(Roughly Equivalent to classic 10:1 or WCAG 7:1)
SAPC Levels: These contrast levels are scaled to help make them easy to remember: 100% for body text, or 70% for small headlines, 40% for large non-text items, etc. These three "key" levels are 30 apart.
When the WCAG standards were first devised font usage was limited and most web content used "WebSafe" fonts. But in recent years, the proliferation of free and easy to embed fonts such as GoogleFonts has made it easy for sites to use fonts that require additional considerations for luminance/color contrast. Small thin fonts get "eaten up" due to subpixel blending and anti-aliasing, and so the color chosen is not what is actually displayed - in some cases the rendered contrast is less than a fifth of what the CSS "color values" would indicate. Body text has suffered the most in this regard.
This level is essentially the same as the classical "10:1" contrast ratio or WCAG 7:1, historically used for body text as is well known in design schools as an ideal target for columns of text (though apparently forgotten by many sites on the internet.)
Minimum average stroke width here is ~1.5px. Preliminarily, this contrast level supports 200 wgt @ 24px, Normal Weight Body Text down to 14px-16px (if it has a minimum x-height of 8px), or incidental normal weight text down to 12px (non-content). On x-height: this is really the determining factor for font size. Future standards should address this. For the purposes of the discussion on this page, assume the x-height is a 0.5 ratio to font size.
110% (Extra Contrast for Small Type)
Minimum average stroke width here is ~1px, a stroke so thin that it becomes blended into the background losing much of the contrast assigned to it.
Levels: So if 100% for body text, then 110% is the added contrast for small thin fonts that need extra contrast for subpixel rendering. (Think of it like Nigel's Amp, with a knob that goes to 11...)
Nevertheless, this is still not enough for small thin fonts if webkit-smoothing is set to "antialias". But then, our opinion is that people should stop doing that. Please. Let the user agent use the default rasterizing method for the device for best perceptual results. Subpixel rendering is usually better than "smoothing AA" and should not be overridden by webkit or moz AA, especially not for body text.
This work is part of an ongoing research project into human visual perception of web content. The work shown here is preliminary, and is not yet a functional part of any standard. It is presented for discussion purposes.