@ajberkow/color-contrast
A utility to check for WCAG compliant color contrast
Last updated 5 months ago by ajberkow .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ajberkow/color-contrast 
SYNC missed versions from official npm registry.

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.

oclif Version Downloads/week License

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

Current Tags

  • 0.0.1                                ...           latest (5 months ago)

1 Versions

  • 0.0.1                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 3
Last Day 1
Last Week 1
Last Month 2
Dependencies (3)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |