color-check
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "color-check", | ||
"description": "", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
@@ -28,3 +28,4 @@ "repository": { | ||
"prepublish": "NODE_ENV='production' npm run build && npm test", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"gen-docs": "jsdoc2md src/index.js" | ||
}, | ||
@@ -57,2 +58,3 @@ "files": [ | ||
"ghooks": "1.3.2", | ||
"jsdoc-to-markdown": "2.0.1", | ||
"mocha": "*", | ||
@@ -59,0 +61,0 @@ "nyc": "8.3.2", |
@@ -7,38 +7,25 @@ # Color Check | ||
## Install | ||
Color Check is a very tine library for checking your foreground and backgorunds colors against the WCAG2 color compliance standard. There are a range of methods which can be found in the [docs](/docs/api.md) including returning the actual values used in calculating the AA, AA 18, AAA and AAA 18 standards as well as color contrast and color difference checks. | ||
``` | ||
$ npm install --save color-check | ||
``` | ||
There are other libraries such as the excelent (color)[https://www.npmjs.com/package/color] package which will parse any valid css color syntax and provide methods for checking the values needed. This library is smaller and returns boolean values where possible. Being smaller, it requires *you* to provide the valid hex string or rgb color object. Errors will simply fail. | ||
## Getting Started | ||
`npm install color-check` | ||
## Usage | ||
# Docs Coming Soon | ||
```js | ||
``` javascript | ||
var colorCheck = require('color-check'); | ||
colorCheck.aa('#000000', {r:0, g:0, b: 0}) // returns true | ||
``` | ||
### Build | ||
For other methods, see the [docs](/docs/api.md) | ||
```js | ||
npm run build | ||
``` | ||
Good accessibility means good UX for everyone! | ||
### Test | ||
Enjoy! | ||
```js | ||
npm test | ||
``` | ||
--- | ||
### Watch | ||
To watch for changes, build them and run the tests: | ||
```js | ||
npm run watch | ||
``` | ||
## License | ||
MIT © [Jesse Martin](https://jessedavidmartin.com) | ||
MIT License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8139
17
31