A CSS value from the fields
Check the contrast of two colors
The ratio uses the WCAG relative luminance of the two opaque colors.
4.5:1 is the usual AA bar for normal text. 3:1 is the bar for large text.
The work stays in this tab.
This tool runs in your browser. Turn on JavaScript to use it.
Contrast
The sample is fixed. It uses the same rule as the form.
- First
- #ffffff
- Second
- #000000
- Ratio
- 21.00:1
- Normal text AA
- Passes
- Large text AA
- Passes
How to use it
- 1Fill in the fields.
- 2Read the result.
- 3Copy the line you need.
Good to know
- Alpha is ignored. Put the color on white yourself before measuring if it is translucent.
- This page does not upload the text.
- Text longer than one hundred thousand characters is rejected.
Questions
Does the result leave this browser?
No. The calculation finishes in the current tab.
What does this page leave out?
Alpha is ignored. Put the color on white yourself before measuring if it is translucent.
What if the input is huge?
Past one hundred thousand characters, the page stops and asks you to shorten it.
Related tools
- Convert a color
The same color is written as hex, RGB, or HSL depending on the file. This page parses one of those forms and prints the other two.
- Mix two colors by a percentage
0 keeps the first color. 100 is the second color. 50 is the midpoint of each channel.
- Add an alpha byte to a hex color
The alpha is a number from 0 to 1. It is written as the last two hex digits.