Text and meaningful non-text elements must have enough contrast against their background so people with low vision and people in harsh light can read them.
WCAG 1.4.3 — Contrast (Minimum) (Level AA)
WCAG 1.4.6 — Contrast (Enhanced) (Level AAA)
WCAG 1.4.11 — Non-text Contrast (Level AA)