Compares relative luminance of two colors. Higher is more legible.
ratio = (L1 + 0.05) ÷ (L2 + 0.05)
Pure white on pure black is 21:1, the maximum.
Some inputs are too long to fit in the URL.
Anyone with this link can read the values it contains. Do not use it for sensitive data.
A quick reference for turning an RGB triplet into its HEX code and HSL equivalent. Paste any of these into the box above to load it.
| Name | HEX | RGB | HSL |
|---|---|---|---|
| Black | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
| White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Grey 40% | #666666 | rgb(102, 102, 102) | hsl(0, 0%, 40%) |
| Grey 50% | #808080 | rgb(128, 128, 128) | hsl(0, 0%, 50%) |
| Blue 600 | #2563EB | rgb(37, 99, 235) | hsl(221, 83%, 53%) |
| Red | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| Green | #008000 | rgb(0, 128, 0) | hsl(120, 100%, 25%) |