One of the accessibility requirements is to ensure that the visual presentation of text and images of text has a contrast ratio of at least 7.1 to meet the AAA standard. WebAIM provides a great tool for checking the color contrast of your background and foreground colors.

WebAIM Contrast Checker

screenshot of the WebAim color contrast checker showing fields to enter background and foreground color codes.