README
color-contrast
============== A small utility to calculate color contrast and determine WCAG compliance. This tool is based on the WebAIM color contrast checker. It uses calculations based on the W3C Web Content Accessibility Guidelines.
Usage
TODO
Commands
Commands take the format color-contrast [-f <foreground hex value>] [-b <background hex value>]
. Foreground and background values can be entered with or without #
signs. The default values are
- foreground:
#000000
- background:
#ffffff
A report is generated for each ratio. For example, entering this command color-contrast -f #123abc
returns
{
"ratio": 8.909214716654146,
"AA": "pass",
"AALarge": "pass",
"AAA": "pass",
"AAALarge": "pass"
}
TODO
- Tests
- Other kinds of color formatting (e.g. rgb, hsl) and possibly transparency