Contrast Aa
Evaluates whether the contrast ratio between foreground text color and background color meets WCAG 2.2 SC 1.4.3 Level AA. Large text (≥ 18pt regular or ≥ 14pt bold) requires 3:1; normal text requires 4.5:1.
$ prime install @community/check-contrast-aa Projection
Always in _index.xml · the agent never has to ask for this.
ContrastAA [check] v1.0.0
Evaluates whether the contrast ratio between foreground text color and background color meets WCAG 2.2 SC 1.4.3 Level AA. Large text (≥ 18pt regular or ≥ 14pt bold) requires 3:1; normal text requires 4.5:1.
Loaded when retrieval picks the atom as adjacent / supporting.
ContrastAA [check] v1.0.0
Evaluates whether the contrast ratio between foreground text color and background color meets WCAG 2.2 SC 1.4.3 Level AA. Large text (≥ 18pt regular or ≥ 14pt bold) requires 3:1; normal text requires 4.5:1.
signature: (fg: Color, bg: Color, fontSize: px, fontWeight: number) -> bool predicate: wcag-contrast-ratio(fg, bg) >= (fontSize >= 18 OR (fontSize >= 14 AND fontWeight >= 700) ? 3.0 : 4.5)
Evidence
@w3c/fact-wcag-contrast-aa
Uses Metric
@community/metric-contrast-ratio
Severity
block
Failure Message
Color pair ({fg}, {bg}) achieves {actual_ratio}:1 — required {required}:1 for {size}pt/{weight} text. Change fg or bg to meet minimum.
Exemptions
- Decorative text (no informational content, aria-hidden=true)
- Logo / wordmark text (brand exemption per WCAG 1.4.3)
- Disabled UI controls (visually grayed-out, not interactive)
Loaded when retrieval picks the atom as a focal / direct hit.
ContrastAA [check] v1.0.0
Evaluates whether the contrast ratio between foreground text color and background color meets WCAG 2.2 SC 1.4.3 Level AA. Large text (≥ 18pt regular or ≥ 14pt bold) requires 3:1; normal text requires 4.5:1.
signature: (fg: Color, bg: Color, fontSize: px, fontWeight: number) -> bool predicate: wcag-contrast-ratio(fg, bg) >= (fontSize >= 18 OR (fontSize >= 14 AND fontWeight >= 700) ? 3.0 : 4.5)
Evidence
@w3c/fact-wcag-contrast-aa
Uses Metric
@community/metric-contrast-ratio
Severity
block
Failure Message
Color pair ({fg}, {bg}) achieves {actual_ratio}:1 — required {required}:1 for {size}pt/{weight} text. Change fg or bg to meet minimum.
Exemptions
- Decorative text (no informational content, aria-hidden=true)
- Logo / wordmark text (brand exemption per WCAG 1.4.3)
- Disabled UI controls (visually grayed-out, not interactive)
Evidence
@w3c/fact-wcag-contrast-aa
Uses Metric
@community/metric-contrast-ratio
Severity
block
Failure Message
Color pair ({fg}, {bg}) achieves {actual_ratio}:1 — required {required}:1 for {size}pt/{weight} text. Change fg or bg to meet minimum.
Exemptions
- Decorative text (no informational content, aria-hidden=true)
- Logo / wordmark text (brand exemption per WCAG 1.4.3)
- Disabled UI controls (visually grayed-out, not interactive)
Source
prime-system/examples/frontend-design/primes/compiled/@community/check-contrast-aa/atom.yaml