APCA CONTRAST CALCULATOR

SAPC DEVELOPMENT VERSION

THIS IS NOT A PRODUCTION SITE

Please use the main APCA or BPCA sites for actual contrast testing. The results on this site may vary due to live experiments, and are not intended for use as a normative color guideline.

SAPC-G
CONTRAST

Click To Swap


All Font Sizes are in CSS px • Fonts Under 80px Shown With Colors at Actual Size & Weight
SCORE 100 200 300 400
Normal
500 600 700
Bold
800 900
Preferred
SCORE 4
SCORE 3
SCORE 2
SCORE 1
sRGB 170
Hex #123
Ls58 1.0
Ls65 1.0
Y 1.0
Yc 1.0

UPPER XXXXXXXXXXX
LOWER XXXXXXX
Click Here for Research ModeExit

RESEARCH MODE ACTIVE

BETA: 0.98G • g4g • TRC:

TEXT COLOR

BACKGROUND

"cookie"
EXAMPLE
&
Click To Swap
Mode Select

About Research Mode

  • "Static Target" is a target with useful features for judging perceived contrast.
  • "Constant Contrast" is an interactive tool where you can adjust the text and background simultaneously to maintain a specific contrast.
    • Enter the desired contrast level in the small input window that is left of the slider label.
    • For reverse contrast, use a negative number.
    • The is a slider control is approximately at the perceptual middle of the contrast while in the green zone.
    • When in the red zone, the lower or upper color is at the maximum (#000 or #fff respectively).
    • It is less accurate at very low contrasts, less than 10.
  • "Split Contrast" is an interactive tool that inserts an achromatic background in between the luminances of the text and background of the main tool.
    • There is a slider that allows you to adjust the luminance of the middle grey.
    • The grey may not always be between the text and BG luminances until you move the slider so it can refresh the colors.
    • This is a simplified version of one of the experiments used here for evaluating model parameters.
  • "Dynamic Fonts" is the default font size and weight grid.
  • Immediately beneath the "Mode Select" is a table of the constants currently in use for this tool.
  • The lower results panel is filled with data about the colors, including LAB and LUV, and some of the raw SAPC values.

DEV 0.98G DEVELOPMENT VERSION

SAPC/APCA Visual Contrast Calculator
Beta 0.98G evaluation • g4g

Generate a URL of This Color Pair
×

Please Enter Valid Colors First!

Click on a color patch next to "Text" or "Background" above to use the HTML5 color-picker (modern browsers). Otherwise enter color values in the text-box as a three or six digit hex value, the '#' is not necessary. Other valid entries are integer rgb(r,g,b) or an HTML color name (see bottom of page for list).

NEW: Using the 0.98G 4g Series Constants

Results will be slightly different from the 2020 version of APCA

IMPORTANT: This version is using a new set of constants that are better at predicting perceptually uniform contrast. The lookup table on this page has been rescaled to match the new constants, so functionally the usage is the same, though the contrast values will be different.

PROBLEMS? Try a "Forced Reload" on your browser, and/or clear the cache. This is the SAPC version, which is part of the research project, and may at times be slightly erratic due to updates — if you are having problems usually a forced reload will fix.If you're having any issues today, try that version. For comments or to report issues, please visit us on GitHub.

About This Month's Default Color Pair

The default pair of colors in the tool this month, to kick off the new year, is an orange #ea7439 background and a white text. This is the color like the infamous "orange button problem" that originally brought my attention to the math issues in the old contrast method. As you can see above, SAPC indicates a much more accurate contrast prediction based on perception.

A little different than the article, the color above #ea7439 and white fails WCAG2 completely, yet if you replace the white with black, WCAG2 math gives it a 7:1 (!!!) Here, with the perceptually accurate SAPC/APCA D series, it passes with white, but black fails (as it should) for all but very large fonts.

(If you came to the site with a different color pair in the URL, click here to load the demo colors.)

Click the white patch to the left of the text color entry to bring up a color picker that should update live (most browsers) and slide down to black to see the display update recommended minimum font sizes in real time. Dragging all the way to black, you'll see the tool indicates a lower contrast as per perception.

It should be noted that those with most forms of CVD prefer the white text as well. Take a screenshot and view it on our CVD simulator to see how contrast actually improves for white text on orange.

For a more in depth look at this, please see
this GitHub Gist with colorful examples.


Accessible Contrast

NEW! Draft Guidelines for the Use-Case Conformance Model

Understanding Use Cases and Conformance Levels

  • FLUENT
    • Fluent Readability, Block/Body Text
      • Defined as: a block or column of more than two continuous lines of content text that uses a readable font with an x-height of ~19px or less.
    • Fluent Readability, Primary content that is not body text
      • Defined as: up to two and a half lines of continuous text.
        • Includes headlines, captions, and images of text, if they contribute to content
        • primary navigation and primary menus
        • asides, tool-tips, spoilers, "continued"
        • user entered text in forms, fields, etc
        • does not include text the user controls or adjusts in size or color
    • Large Fluent header/title content
      • Defined as: fluent subcategory of "large content" such as big, bold headlines, and generally referring to text larger than 36px.
  • SUB FLUENT
    • Soft Readability, small sub-fluent secondary/ancillary content
      • Defined as: non-primary content with relaxed readability needs.
        • Applies to certain aspects of dataviz (call-outs, de-enhanced aspects of visual hierarchy)
        • Category can include secondary/tertiary nav such as to TOS/EULA
        • May include byline, short duplicative captions, footer matter.
    • Spot Readability, sub-fluent "non-content"
      • Defined as: non-content text of an incidental nature.
        • This category includes non-informative placeholder text, disabled controls, copyright/trademark/license bugs (but not actual license or legal text blocks)
    • Logo or Branding, brand related logo, symbol, service mark.
      • This category relates to specific colors that are required as part of a brand or logotype.
    • Incidental Text in Images text in images not critical to the understanding, nor specifically contributing to the content.

Conformance Levels: Bronze, Silver, and Gold

  • BRONZE: Covers primary content text only.
    • There is no font lookup table, only a set of general conformance levels.
    • Use-cases for "body text" and "other content text".
    • Spot text: disabled, placeholder, ancillary, decorative text is not covered
    • Logos and incidental text in images are not covered
    • There is no specified minimum font size.
    • There is no requirement to match a reference font weight or size.
  • SILVER: Covers all text content.
    • Font weight and size per Lc contrast value and font lookup table.
    • Use-cases for "body text", "fluent text", "large fluent text", "sub-fluent text".
    • Logos are covered, with a contrast requirement reduced by Lc 15.
    • Spot text: disabled, placeholder, ancillary, decorative text are covered as a recommendation (should)
    • The minimum font size for content is 13px, based on an x-height ratio of 0.5 (minimum x-height of 7.5px)
    • Minimum font size for non-content text is 10px.
    • There is no requirement to compare to a reference font weight or size.
  • GOLD: Covers all text content, enhanced.
    • Font weight and size per Lc contrast value and font lookup tables per use cases.
    • Use-cases for "body text", "fluent text", "large fluent text", "sub-fluent text", "spot text" (Disabled, placeholder) and Logos.
    • Ancillary, decorative text are covered with recommendations
    • The minimum font size for content text is 18px, based on an x-height ratio of 0.5 (minimum x-height of 9px).
    • Minimum font size for non-content text is 12px.
    • Fonts used for content text must be compared to a reference font's weight or size, and appropriate offset used for equivalency.

APCA Guidelines: Simple Levels

These general levels are appropriate for use without reference to the lookup table. The lookup table simply adds additional accuracy, which allows for greater flexibility.

These define the basic minimum levels, what you might think of as A/AA in the old WCAG 2. For the equivelent to AAA, simply increase the contrast values by Lc 15.

Notes on font size

Using the Lookup Table

APCA CONTRAST LOOKUP TABLE
Sorted by Contrast Value (Lc)
Revised May 25, 2022
Reference Font Weight
Font
Size
100 200 300 400
Normal
500 600 700
Bold
800 900
pt px APCA Contrast Value (Lc)
9 12 ®© ®© ®© ®©
10.5 14 ®© 100 100 90 75
11.25 15 ®© 100 90 75 70
12 16 ®© 90 75 70 60 60
13.5 18 ®© 100 75 70 60 55 55 55
15.75 21 ®© 90 70 60 55 50 50 50
18 24 ®© 75 60 55 50 45 45 45
21 28 100 70 55 50 45 43 43 43
24 32 90 65 50 45 43 40 40 40
27 36 75 60 45 43 40 38 38 38
31.5 42 100 70 55 43 40 38 35 35 35
36 48 90 60 50 40 38 35 33 33 33
45 60 75 55 45 38 35 33 30 30 30
54 72 60 50 40 35 33 30 30 30 30
72 96 50 45 35 33 30 30 30 30 30

APCA CONTRAST LOOKUP TABLE
Sorted by Contrast Value (Lc)
Revised May 25, 2022
Reference Font Weight
Font
Size
100 200 300 400
Normal
500 600 700
Bold
800 900
Lc Value APCA Contrast Value (Lc)
Lc 100 42 26.5 18.5 15 14.5 13.5 13 16 18
Lc 95 45 28 19.5 15.5 15 14 13.5 16 18
Lc 90 48 32 21 16 15.5 14.5 14 16 18
Lc 85 52 34.5 22 16.5 15.6 14.6 14 16 18
Lc 80 56 38.3 23 17.3 15.8 14.8 14 16 18
Lc 75 60 42 24 18 16 15 14 16 18
Lc 70 64 44 28 19.5 18 16 14.5 16 18
Lc 65 68 46 32 21.7 19 17 15 16 18
Lc 60 72 48 42 24 21 18 16 16 18
Lc 55 80 60 48 28 24 21 18 18 18
Lc 50 96 72 60 32 28 24 21 21 21
Lc 45 108 96 72 42 32 28 24 24 24
Lc 40 120 108 96 60 48 42 32 32 32
Lc 35 NT 120 108 96 72 60 48 48 48
Lc 30 NT NT 120 108 108 96 72 72 72
Lc 25 NT NT NT 120 120 108 96 96 96
Lc 20 NT NT NT NT NT NT NT NT NT
Lc 15 NT NT NT NT NT NT NT NT NT

About the colors in these tables: The colors in these tables are designed to be discernible by all forms of color vision deficiency.


APCA CONTRAST COLOR CODES
— PROHIBITED Except for Decorative Purposes
©§™ — May be used for Copyright/ByLine ONLY
× — Do Not Use for Body Text (Blocks or Columns)
Weight 100 Fonts Should be Avoided
> — Minimum Contrast for Text
APCA 80 — Similar to WCAG 7∶1 for BG #ddd and lighter
APCA 60 — Similar to WCAG 4.5∶1 for BG #d0d0d0 and lighter
APCA 40 — Similar to WCAG 3∶1 for BG #ccc and lighter


The Science Behind SAPC/APCA

Advanced Perceptual Contrast Algorithm

For a brief overview and explanation of the SAPC math and methods, take a look at Experiment Results CE17, one of the polarity experiments. The discussion includes graphs comparing SAPC to other contrast methods, and related discussions.

Also, as spatial frequency is one of the most important predictors of contrast perception and readability, see Experiment Results CE14-weight for further explanations.

The "TL;DR" is: like all human perceptions, color and contrast are extremely context dependent. In terms of readability, there is a "critical contrast" level, and that level is more dependent on spatial frequency, which relates to font weight, than a given color pair.

To accurately predict contrast perception, the Spatial (font weight & size), color (perceived lightness difference between text and background), and context (ambient light, surroundings, intended purpose of the text) all need to be taken into account.

What is the Contrast of This Page?

Most of this page is set at over 120 in "old" APCA numbers, which now is approximately 90Lc. To help differentiate between dark text on a light background and light text on dark, the math reports the latter as a negative value. But for purposes of the font lookup table, ignore the minus sign and use the absolute value.

      

Minimum Type Size

Examples for Various Levels

Here are a set of type samples using the above selected colors. The first is the standard sans-serif Helvetica Neue, a very common font that was used as the reference font for many of the perception experiments. The initial serif font sample shown is Trirong. The samples here (other than Helvetica) can be found on Google fonts.

On the left of each sample line is the level, as in APCA contrast Lc60 (positive or negative). This (and the above chart) are based on the standard font "Helvetica" but as should be clear when choosing other fonts, the variation in weight is enough to change perceived contrast. You can scroll the samples left to see smaller text.

At the end of each sample section you can select alternate test fonts. You'll notice there are substantial differences in font weight, especially noticeable in the very light and thin fonts. Designers and developers should be aware of these differences, as adjust to compensate for differences relative to a reference standard font.

It is further advised to test fonts on various major browsers, as each browser renders fonts differently, especially thin fonts and fonts with poor hinting. For instance, the sample font "JOST" renders differently in Safari, Chrome, Opera, and Firefox. On MacOS, while Safari and Firefox maintain some legibility in the very thin 100 weight Jost, the thin versions of Jost literally disappear in Chrome and Opera.

Conformance Rating Color Codes
Preferred 5Score 4Score 3Score 2Score 1Score 0

SANS SERIF FONT SAMPLES ←scrollable→

Lc15 & 96px9 NonText ☎★♜♦⇪
LLc 15
Lc20 & 96px600 II 72px 700 Ax II 60px800 II 48px 900wt ATOMgap
L Lc 30
Lc30 & 96px 400 II 68px 500 Ax II 58px 600 II 48px 700wt ATOMgap II 38.5px 800wt ATOMgap II 29px 900wt ATOMgap
L Lc 40
Lc40 & 68px 300wt Ax II 48px 400wt ATOMsz II 34px 500wt ATOM II 29px 600wt IcyATOMsizedgap Axed II 24px 700wt IcyATOMsizedgap Ax II 19px 800wt IcyATOMsized II 18px 900wt IcyATOMsizedgap
L Lc 45
Lc45 & 72px 200wt ATOMs II 51px 300wt ATOMs II 36px 400wt ATOMsized gap II 27px 500wt ATOMsize II 23.5px 600wt IcyATOMsizedgap ATOMgap 12345 II 20px 700wt IcyATOMsizedgap ATOMgap 12345 II 18px 800wt IcyATOMsizedgap II 18px 900wt IcyATOMsizedgap
L Lc 60
Lc60 & 48px 200wt ATOMs II 36 4px 300wt ATOMsizedgaps II 24px 400wt ATOMsized gap II 21px 500wt IcyATOMsizedgap The Lazy Brown Fox Slept Instead II 18px 600wt ATOM The Lazy Brown Fox Slept Instead II 16px 700wt ATOMsized II 16px 800wt ATOMsized II 16px 900wt ATOMsized
L Lc 75
Lc 75 & 60px 100wt Ax II 36px 200wt ATOM sized gap II 24px 300wt ATOMsized gap II 18px 400wt IcyATOMsizedgap The Lazy Brown Fox Slept Instead II 17px 500wt ATOM The Lazy Brown Fox Slept Instead II 15px 600wt IcyATOMsizedgap
L Lc 90
Lc90 & 50px 100wt ATOMsizedga II 30px 200wt Icy ATOM sized gap 1234567890 II 21px 300wt Icy ATOM sized gap 1234567890 II 15px 400wt Icy ATOM sized gap 1234567890 The Lazy Brown Fox Slept Instead
L Lc 100
Lc100 & 46px 100wt ATOMsizedga II 28px 200wt Icy ATOM sized gap 1234567890 II 18px 300wt Icy ATOM sized gap 1234567890 II 14px 400wt Icy ATOM sized gap 1234567890 The Lazy Brown Fox Slept Instead

Sans Serif Font Selectors § Current: Montserrat

Notes: K2D does not have a 900wt, and the Helvetica 600wt is condensed.


SERIF FONT SAMPLES

Lc 30
Lc30 & 96px 400 II 68px 500 Ax II 58px600 II 48px 700wt ATOMgap II 38.5px 800wt ATOMgap II 29px 900wt ATOMgap
Lc 40
Lc 40 & 68px 300wt Ax II 48px 400wt ATOMsz II 34px 500wt ATOM II 29px 600wt IcyATOMsizedgap Axed II 24px 700wt IcyATOMsizedgap Ax II 19px 800wt IcyATOMsized II 18px 900wt IcyATOMsizedgap
Lc 45
Lc 45 & 72px 200wt ATOMs II 51px 300wt ATOMsized gap II 36px 400wt ATOMsized gap II 27px 500wt ATOMsize II 23.5px 600wt IcyATOMsizedgap ATOMgap 12345 II 20px 700wt IcyATOMsizedgap ATOMgap 12345 II 18px 800wt IcyATOMsizedgap II 18px 900wt IcyATOMsizedgap
Lc 60
Lc60 & 48px 200wt ATOMs II 36px 300wt ATOMsizedgaps II 24px 400wt ATOMsized gap II 21px 500wt IcyATOMsizedgap The Lazy Brown Fox Slept Instead II 18px 600wt ATOM The Lazy Brown Fox Slept Instead II 16px 700wt ATOMsized II 16px 800wt ATOMsized II 16px 900wt ATOMsized
Lc 75
Lc75 & 60px 100wt Ax II 36px 200wt ATOM sized gap II 24px 300wt ATOMsized gap II 18px 400wt IcyATOMsizedgap The Lazy Brown Fox Slept Instead II 17px 500wt ATOM The Lazy Brown Fox Slept Instead II 15px 600wt IcyATOMsizedgap
Lc 90
Lc90 & 50px 100wt ATOMsizedga II 30px 200wt Icy ATOM sized gap 1234567890 II 21px 300wt Icy ATOM sized gap 1234567890 II 15px 400wt Icy ATOM sized gap 1234567890 The Lazy Brown Fox Slept Instead

Serif Font Selectors § Current: Trirong



MONITOR ADJUSTMENT AFFECTS PERCEIVED CONTRAST

sRGB gamma target. Adjust the monitor so that the targets appears uniform (i.e. the thick border looks the same as the inner grid). Note also it is important that the image be at 100% and not scaled - make sure your browser says "actual size".
Background Target Value #22 (d)
Background Target Value #33 (d)
Background Target Value #44 (d)
Background Target Value #55 (d)
Background Target Value #80 (d)
Background Target Value #a0 (d)