Passes WCAG
Evaluate whether two colors have sufficient contrast to pass WCAG requirements.
Doesn't handle transparency as of yet.
Installation
npm i passes-wcag
Usage
; ; // true // true // false
Signature
passesWcagAaLargeText(color1: string, color2: string) => boolean
passesWcagAa(color1: string, color2: string) => boolean
passesWcagAaa(color1: string, color2: string) => boolean
Contributing
I appreciate your issues and PRs on Github!
Testing
yarn build && yarn test
Releasing
This project uses np.
- Make sure your changes are in master
- Run
yarn release
- Follow the interactive release guide