I need to get the contrast color for a text foreground using the background color and contrast ratio between colors.
Example: Background - Colors.Red Contrast ratio - 7.0
With the above inputs, I need to calculate the foreground color.
Is there any formula available to get this?