What does Colour-Vision Deficiency and Discriminability conclude, in numbers, about “Eight Per Cent and Four and a Half to One: Why Red and Green Buttons That Pass Contrast Still Collide”?
Answer: Chapters 1 to 4 present population shares and a counterexample, sRGB linearisation and WCAG contrast, Machado's three simulation matrices and confusion pairs, and an implementation of CIELAB and CIEDE2000 checked digit by digit against published test data.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (21 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only
| red-green colour-deficient share and what a site meets | |||||
| group | share | per10k | P>=1 of 5 | of 10 | n90% |
| European men | 0.080 | 800 | 0.341 | 0.566 | 28 |
| Chinese/Japanese men, low | 0.040 | 400 | 0.185 | 0.335 | 57 |
| Chinese/Japanese men, high | 0.065 | 650 | 0.285 | 0.489 | 35 |
| European women | 0.004 | 40 | 0.020 | 0.039 | 575 |
| 50/50 mix, European | 0.042 | 420 | 0.193 | 0.349 | 54 |
| 50/50 mix, East Asian low | 0.022 | 220 | 0.105 | 0.199 | 104 |
| n90% = smallest review panel with a 0.9 chance of one member |
Show the full program
# Chapter 1. p11: how many red-green colour-deficient users a site meets.
# Model: binomial counting. Shares are the survey figures summarised by
# Birch 2012 (JOSA A): about 8% of European Caucasian men and about 0.4%
# of women; 4% to 6.5% of men of Chinese and Japanese ethnicity. The
# 50/50 audience mix and the panel sizes are illustrative.
import math
def lin(c):
v = c / 255.0
if v <= 0.04045:
return v / 12.92
return ((v + 0.055) / 1.055) ** 2.4
def rgb(h):
h = h.lstrip("#")
return tuple(lin(int(h[i:i + 2], 16)) for i in (0, 2, 4))
def lum(c):
return math.fsum((0.2126 * c[0], 0.7152 * c[1], 0.0722 * c[2]))
def contrast(a, b):
hi, lo = sorted((lum(a), lum(b)), reverse=True)
return (hi + 0.05) / (lo + 0.05)
GROUPS = (("European men", 0.080),
("Chinese/Japanese men, low", 0.040),
("Chinese/Japanese men, high", 0.065),
("European women", 0.004),
("50/50 mix, European", 0.5 * 0.080 + 0.5 * 0.004),
("50/50 mix, East Asian low", 0.5 * 0.040 + 0.5 * 0.004))
def at_least_one(p, n):
return 1.0 - (1.0 - p) ** n
def panel_for(p, target=0.9):
return math.ceil(math.log(1.0 - target) / math.log(1.0 - p))
if __name__ == "__main__":
print("red-green colour-deficient share and what a site meets")
print("group share per10k P>=1 of 5"
" of 10 n90%")
for name, p in GROUPS:
print("{:<27s} {:6.3f} {:6.0f} {:9.3f} {:5.3f} {:4d}"
.format(name, p, 10000 * p, at_least_one(p, 5),
at_least_one(p, 10), panel_for(p)))
print("n90% = smallest review panel with a 0.9 chance of one member")Single source and citation
Fan, Y. (2026). Simulating Colour-Vision Deficiency and Colour Discriminability: Buttons and Charts as Seen by Red-Green Colour-Deficient Users (Version 1.0.0), Chapter 1: Eight Per Cent and Four and a Half to One: Why Red and Green Buttons That Pass Contrast Still Collide. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-324 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026324,
author = {Fan, Yafu},
title = {Simulating Colour-Vision Deficiency and Colour Discriminability: Buttons and Charts as Seen by Red-Green Colour-Deficient Users},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 2 · Linear Light and Relative Luminance: What WCAG Contrast Computes and What It Leaves Out
- Chapter 3 · The Machado Matrices: Simulating Three Kinds of Dichromacy in Linear sRGB
- Chapter 4 · CIELAB and CIEDE2000: Turning "a Visible Difference" into a Number
- Chapter 5 · Safe Colours for Right and Wrong Buttons: a Hue Search and a Luminance-Only Scheme
- Chapter 6 · Chart Palettes: Discriminability Matrices and How Many Series Colour Can Carry
- Chapter 7 · Classical Sources East and West: the Paired Colours of the Kaogong ji and Dalton's 1798 Account
- Chapter 8 · Closing the Loop: a Colour-Vision Check in the Front-End Style Library, the Colour-Vision-Safe Palette Checker and a Pre-Registered Test