Based on the WCAG 2.0 level AA color contrast requirements. Made for 10k Apart Contest.
- Input two color HEX values to calculate the contrast ratio.
- If the constrast ratio is below 4.5 (red), adjust a color by clicking on 'Lighten' or 'Darken' until the contrast ratio is above 4.5 (green). Note: The approved ratio is 3 for large text.
- Toggle a color to be white or black by clicking on 'Black' or 'White'.
Click on 'Launch Widget' to open the page in a new window adjusted to the size of the calculator (only available on bigger devices). This provides the user to have the calculator open while developing / designing without having to change tabs.
- Fork and clone this repo
- Run
npm install
- Run
gulp
- The website will automatically open in a new tab
- HTML
- SCSS
- Vanilla JS
- Performance grade: 100
- Page size: 7.5kb
- Faster than 99% of tested sites on pingdom (Tested from their San Jose, CA location)
- Chrome extension with color picker