Paperbase Docs

PB_COLOR_CONTRAST_LOW

A text color in the rendered output fails WCAG AA contrast ratio against its background.

Severitywarning
Categorydesign
Agent-repairableYes

What happened

A text/background color combination in the rendered PDF fails the WCAG AA contrast ratio of 4.5:1. The text may be hard to read, especially in print.

How to fix

Darken the text color or lighten the background. The most common cause is a light primary_color or accent_color in the theme:

// Before — light primary (#ccc on white = ~1.6:1 contrast)
theme: { primary_color: "#cccccc", accent_color: "#cccccc" }
 
// After — dark primary (#1a1a1a on white = ~16:1 contrast)
theme: { primary_color: "#1a1a1a", accent_color: "#2563eb" }

You can also override specific elements with inline CSS:

<p style="color: #1a1a1a">This text is always dark.</p>

WCAG AA requirements

UseMinimum ratio
Normal text (< 18pt)4.5:1
Large text (≥ 18pt or bold ≥ 14pt)3:1
UI components and graphics3:1

On this page