A simple HTML & JS widget for calculating color contrast, allowing developers to make the ideal text-on-background color selections
The "Contrast ratio" widget relies on using one color for the background and the second for the text. The same process is re-applied, but with the color codes inverted between the two.
It then goes on to apply the standard readability algorithm, and calculate a coefficient for each version.
For every calculated ratio, the user can hover his mouse over the value and see more details about the result, and then choose the one with the best value.