The WCAG guidelines set the following requirements for text/link/background contrast:
- A 4.5:1 contrast between the non-link text color and the background.
- A 4.5:1 contrast between the link text color and the background.
- A 3:1 contrast between the link text color and the surrounding non-link text color.
Assuming that requirement 1 of the above is satisfied, given a white background, and given a (non-link) text color that ranges from black to dark grey, is there a heuristic, formula, or algorithm to find a link color that would satisfy the other two requirements? It would be especially helpful if the algorithm or formula were specified in terms of Hue-Lightness-Saturation. Thank you.