How to use this tool
- Enter text color (#rrggbb), background color (#rrggbb).
- Select Update result to view the result.
- Check the method and assumptions below before using the result.
The method, explained
Convert sRGB channels to linear values, calculate relative luminance, then divide (lighter + 0.05) by (darker + 0.05).
Black on white has a contrast ratio of 21:1.
What to keep in mind
Solid opaque colors only. Large text means at least 18 pt, or 14 pt bold. Contrast alone does not establish full accessibility.
Common questions
How does this tool handle my input?
Processing happens in your browser. Your pasted content is not uploaded, included in URLs or stored as a calculation history.
What input should I use?
Text color (#RRGGBB): use the example already shown, then replace it with your own content. Solid opaque colors only. Large text means at least 18 pt, or 14 pt bold. Contrast alone does not establish full accessibility.
Methodology maintained by ClarityKit. How these tools are built and checked.