AL
alexchantastic/contrast-table
:rainbow: Generate a table for determining color contrast for color pairs
๐ contrast-table
Generate a table to help you determine if your color palette is accessible as per WCAG 2.1.
How to use
-
Navigate to https://alexchantastic.github.io/contrast-table/
-
When you first load the app, an example color palette will be loaded for you
-
To change the color palette used, append your comma separated color palette to the URL starting with a
?e.g., https://alexchantastic.github.io/contrast-table/?#000,#fff
-
Each cell represents the combination of the column header (foreground color) and the row header (background color) and displays:
- ๐ก โ body text passes
- ๐ก โ body text fails
- ๐ โ large-scale text passes
- ๐ โ large-scale text fails
- Contrast ratio
- Score (AA / AAA / F)
Accepted color values
| Value type | Example |
|---|---|
| Hex | #b4d455 |
| Named | rebeccapurple |
| rgb | rgb(255, 255, 255) |
| rgba | rgba(255, 255, 255, 0.5) |
License
Code released under the MIT License.
On this page
Contributors
MIT License
Created November 24, 2018
Updated April 24, 2025
