Appearance
Color contrast is how legible colors are when placed next to, and on top of each other.
To meet the level AA WCAG 2.2 guidelines, text and background colors must have a contrast ratio of at least 4.5:1 for medium sized text, and 3:1 for large text.
For borders and icons the contrast should be at least 3.0:1.
Colour Contrast Analyser (CCA)
A great tool to check the contrast ratio of your colors is the Colour Contrast Analyser app. This can be downloaded for free for Mac and Windows.