Readable text needs enough contrast against its background. Set two colours and get the exact ratio plus the WCAG pass/fail at each level. Aim for 4.5:1 on body text.
Body copy at a normal weight and size — this is what most of your readers actually read, so it must clear 4.5:1.
Small print and captions need the same ratio to stay legible.
Large text (24px+, or 19px bold) only needs 3:1. But when in doubt, design everything to AA 4.5:1 — it covers low-vision readers and bad screens alike.
Further reading — the standards behind the verdict