Socket
Socket
Sign inDemoInstall

color-check

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-check - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

6

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc