Guth
NewsDocs
Page actions
View as Markdown ↗
Explore MCP tools ↗

instrument / verified-clean

WCAG Contrast Ratio Checker

The current ledger marks this instrument verified clean within the source-bound verification corpus.

Status: VERIFIED_CLEANLifecycle: verified-clean

Inspectable records

Ledger state

The current ledger marks this instrument verified clean within the source-bound verification corpus.

Area
Audio, Music, Photography & Color
Tranche
tranche-5
Evidence ID
t5-023
Ledger rows
1

No ledger note is attached.

Review findings

The honest label correctly distinguishes the WCAG 2.x relative-luminance model from WCAG 3 APCA. Verdict is NEEDS_REVIEW because the exact luminance implementation, luminance ordering, AAA large-text threshold, input color encoding, and large-text definition are not fully specified.

Formula and scope findings

  • The contrast formula is correct only when L1 is the greater of the two relative luminances and L2 is the lesser; the specification does not explicitly require max/min ordering.
  • The relative-luminance formula is underspecified: it should explicitly define sRGB channel normalization, the 0.04045 linearization breakpoint, the 12.92 divisor, the 2.4 exponent, and the coefficients 0.2126, 0.7152, and 0.0722.
  • The listed threshold constants are incomplete and ambiguous: WCAG AAA is 7:1 for normal text but 4.5:1 for large text, while the spec lists only 7:1 for AAA despite promising normal and large text results.
  • The specification does not define the WCAG large-text classification needed to select the large-text thresholds: at least 18 point regular or 14 point bold, approximately 24px regular or 18.67px bold.

Unit assumptions

  • Colors are standard sRGB colors, supplied as 8-bit channels or hexadecimal values and normalized from 0-255 to 0-1 before linearization.
  • For each sRGB channel c, use c/12.92 when c<=0.04045; otherwise use ((c+0.055)/1.055)^2.4.
  • Relative luminance is L=0.2126R+0.7152G+0.0722B, with the WCAG sRGB/D65 coefficients.
  • The reported contrast ratio is unitless and uses L1=max(Lforeground,Lbackground) and L2=min(Lforeground,Lbackground).
  • Pass thresholds are inclusive: AA normal >=4.5, AA large >=3, AAA normal >=7, and AAA large >=4.5.

Boundary hardening

BREAK_CLAIMED · SELF_FLAGGED

An out-of-range sRGB input can make relative luminance equal -0.05 and force the contrast denominator to zero. The checker must validate channel ranges and reject such input rather than return Infinity, NaN, or a misleading pass/fail result.

Errata and corrections

No applied erratum is attached to this unique-name record.

Inspectable example

4 review vectors are recorded. One source-bound sample is shown below.

{
  "inputs": {
    "foreground": "#000000",
    "background": "#FFFFFF"
  },
  "expected_outputs": {
    "contrast_ratio": 21,
    "AA_normal": true,
    "AA_large": true,
    "AAA_normal": true,
    "AAA_large": true
  },
  "working": "Normalize black=(0,0,0), white=(1,1,1). Black linear channels=(0,0,0), so Lblack=0. White linear channels=(1,1,1), so Lwhite=0.2126+0.7152+0.0722=1. L1=1 and L2=0. Contrast=(1+0.05)/(0+0.05)=1.05/0.05=21.00. Compare: 21>=4.5, 21>=3, 21>=7, and 21>=4.5, so every result passes."
}

Related workflows

No source-defined multi-instrument workflow membership is recorded.

Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

  • VERIFIED_LEDGER.json · VERIFIED_CLEAN
  • evidence-tranche5/tranche5-results.json
  • BOUNDARY_HAZARD_CATALOG.json