colors-regex

2.0.0 • Public • Published

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

Package Sidebar

Install

npm i colors-regex

Weekly Downloads

1,101

Version

2.0.0

License

MIT

Unpacked Size

5.63 kB

Total Files

10

Last publish

Collaborators

  • tiaanduplessis