Too Long; Didn't Read
The intent of this Success Criterion is to provide enough contrast between text and its background so that it can be read by people with moderately low vision. Contrast ratio can be calculated by finding out relative luminance of both background and foreground colors in current loop. All these values are looped to find the suitable match. To achieve WCAG 2 AA contrast ratio, use color-contrast function to generate contrast text color. The color is returned to a color that matches the contrast ratio of foreground and background colors.