Contrast Checker
WCAG 2.1 guidelines state that colors should have a text-to-background contrast ratio of 4.5:1 for normal text and 3:1 for large text (and non-text elements such as form fields and other interactive elements) to meet basic AA requirements or 7:1 for normal text and 4.5:1 for large text (and non-text elements) to meet the stricter AAA requirements (always aim for strict).
Ensuring a high contrast ratio for your site’s design can make it easier for visually impaired and color-blind users to read and interact with the contents of your website.