Regular expressions for rgb, rgba, hex, hexa, hsl & hsla colors
This project uses node and npm.
$ npm install colors-regex
$ # OR
$ yarn add colors-regex
const assert = require('assert')
const colorRegex = require('colors-regex')
assert(colorRegex.hex.strict.test('#000000')) // Success
assert(colorRegex.hex.strict.test('#2')) // Failure
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
MIT