CSS Specificity is about which browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied. Specificity is based on the matching rules which are composed of different sorts of CSS selector.
Having good color contrast on your site benefits all your users, but it is particularly beneficial to users with certain types of color blindness and other similar conditions, who experience low contrast, and have trouble differentiating between similar colors. This is because they don't see bright and dark areas as readily as those without such conditions, and therefore have trouble seeing edges, borders, and other details.
The reason why we mest meet contrast ratios is some people might have a diffuclt time seeing some color so we need to make sure that every users cana see.
The WCAG which stand's for Web Content Accessibility Guidelines Working Group set's the accessibility rules. WAI updates Techniques for WCAG 2 and understanding WCAG 2 periodically.
In this document it talks about how the rules of calculating CSS specificity, colar contrast ratios.