关于「八个百分点与四点五比一:对比度合格的红绿按钮为何仍会撞色」,《色觉缺陷模拟与配色可辨性》给出的定量结论是什么?

结论:第一至四章依次给出人群比例与反例、sRGB 线性化与 WCAG 对比度、Machado 三个模拟矩阵与混淆对、CIELAB 与 CIEDE2000 的实现及与公开检验数据的逐位核对。

数据口径:书中参数为示意;全部计算由书中程序生成;模拟不对应任何具体的人,本书不对任何个人的色觉作判断,属于非个人化经营建议。 本书用色觉模拟与色差计算推翻这条推理。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库

red-green colour-deficient share and what a site meets
groupshareper10kP>=1 of 5of 10n90%
European men0.0808000.3410.56628
Chinese/Japanese men, low0.0404000.1850.33557
Chinese/Japanese men, high0.0656500.2850.48935
European women0.004400.0200.039575
50/50 mix, European0.0424200.1930.34954
50/50 mix, East Asian low0.0222200.1050.199104
n90% = smallest review panel with a 0.9 chance of one member
查看完整验算程序
# 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")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《色觉缺陷模拟与配色可辨性、红绿色弱用户眼中的按钮与图表母典》第 1 章「八个百分点与四点五比一:对比度合格的红绿按钮为何仍会撞色」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 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}
}

本书其他章节结论