2.0.0 • Published 6 years ago

colors-regex v2.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

colors-regex

package version package downloads standard-readme compliant package license make a pull request

Regular expressions for rgb, rgba, hex, hexa, hsl & hsla colors

Table of Contents

Install

This project uses node and npm.

$ npm install colors-regex
$ # OR
$ yarn add colors-regex

Usage

const assert = require('assert')
const colorRegex = require('colors-regex')

assert(colorRegex.hex.strict.test('#000000')) // Success
assert(colorRegex.hex.strict.test('#2')) // Failure

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT