{
  "_id": "hex-color-regex",
  "maintainers": [
    {
      "email": "mameto2011@gmail.com",
      "name": "tunnckocore"
    }
  ],
  "keywords": [
    "color",
    "colors",
    "css",
    "expr",
    "expression",
    "expressions",
    "hex",
    "match",
    "matching",
    "regex",
    "regexp",
    "regexps",
    "regular",
    "web"
  ],
  "dist-tags": {
    "latest": "1.1.0"
  },
  "author": {
    "name": "Charlike Mike Reagent",
    "email": "@tunnckoCore",
    "url": "http://www.tunnckocore.tk"
  },
  "_rev": "27-300f10e9eee556f1d5cee0d53b1e5cfa",
  "description": "The best regular expression (regex) for matching hex color values from string.",
  "readme": "# [hex-color-regex][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> The best regular expression (regex) for matching hex color values from string.\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coverage-img]][coverage-url] [![dependency status][david-img]][david-url]\n\n\n## Install\n```\nnpm i hex-color-regex --save\nnpm test\n```\n\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n- `[opts]` **{Object}** pass `strict: true` for strict mode\n- `return` **{RegExp}**\n\n**Example**\n\n```js\nvar hexColorRegex = require('hex-color-regex')\n\nhexColorRegex().test('#f3f}') //=> true\nhexColorRegex({strict: true}).test('#f3f}') //=> false\n\nhexColorRegex().test('foo #f3f bar') //=> true\nhexColorRegex({strict: true}).test('foo #f3f bar') //=> false\n\nhexColorRegex().test('#a54f2c}') //=> true\nhexColorRegex({strict: true}).test('#a54f2c}') //=> false\n\nhexColorRegex().test('foo #a54f2c bar') //=> true\nhexColorRegex({strict: true}).test('foo #a54f2c bar') //=> false\n\nhexColorRegex().test('#ffff') //=> false\nhexColorRegex().test('ffff') //=> false\n\nhexColorRegex().test('#fff') //=> true\nhexColorRegex().test('fff') //=> false\n\nhexColorRegex().test('#4g1') //=> false\nhexColorRegex().test('4g1') //=> false\nhexColorRegex().test('#zY1') //=> false\nhexColorRegex().test('zY1') //=> false\nhexColorRegex().test('#7f68ZY') //=> false\nhexColorRegex().test('7f68ZY') //=> false\nhexColorRegex().test('ffffff') //=> false\n\nhexColorRegex().test('#afebe3') //=> true\nhexColorRegex().test('#AFEBE3') //=> true\nhexColorRegex().test('#3cb371') //=> true\nhexColorRegex().test('#3CB371') //=> true\nhexColorRegex().test('#556b2f') //=> true\nhexColorRegex().test('#556B2F') //=> true\nhexColorRegex().test('#708090') //=> true\nhexColorRegex().test('#7b68ee') //=> true\nhexColorRegex().test('#7B68EE') //=> true\nhexColorRegex().test('#eeeeee') //=> true\nhexColorRegex().test('#ffffff') //=> true\nhexColorRegex().test('#111111') //=> true\n\nhexColorRegex().test('#afe') //=> true\nhexColorRegex().test('#AF3') //=> true\nhexColorRegex().test('#3cb') //=> true\nhexColorRegex().test('#3CB') //=> true\nhexColorRegex().test('#b2f') //=> true\nhexColorRegex().test('#5B2') //=> true\nhexColorRegex().test('#708') //=> true\nhexColorRegex().test('#68e') //=> true\nhexColorRegex().test('#7AF') //=> true\nhexColorRegex().test('#777') //=> true\nhexColorRegex().test('#FFF') //=> true\nhexColorRegex().test('#fff') //=> true\n```\n\n\n## Matching groups\n\n- `match[0]` hex value with hash - `#f3f3f3`\n- `match[1]` hex value without the hash - `f3f3f3`\n\n**Example**\n\n```js\nhexColorRegex().exec('foo #fff bar')\n//=> [ '#fff', 'fff', index: 4, input: 'foo #fff bar' ]\n\nhexColorRegex({strict: true}).exec('foo #fff bar')\n//=> null\n\nhexColorRegex().exec('foo #f3f3f3 bar')\n//=> [ '#f3f3f3', 'f3f3f3', index: 4, input: 'foo #f3f3f3 bar' ]\n\nhexColorRegex({strict: true}).exec('foo #f3f3f3 bar')\n//=> null\n```\n\n\n## Related\n- [benz](https://github.com/tunnckocore/benz): Compose your control flow with absolute elegance. Support async/await, callbacks, thunks, generators, promises, observables, child… [more](https://github.com/tunnckocore/benz)\n- [is-hexcolor](https://github.com/tunnckocore/is-hexcolor): Check that given value is valid hex color, using `hex-color-regex` - the best regex for… [more](https://github.com/tunnckocore/is-hexcolor)\n- [is-ansi](https://github.com/tunnckocore/is-ansi): Check that given string contain ANSI color codes, without CLI\n- [is-missing](https://github.com/tunnckocore/is-missing): Check that given `name` or `user/repo` exists in npm registry or in github as user… [more](https://github.com/tunnckocore/is-missing)\n- [is-kindof](https://github.com/tunnckocore/is-kindof): Check type of given javascript value. Support promises, generators, streams, and native types. Thin wrapper… [more](https://github.com/tunnckocore/is-kindof)\n- [is-typeof-error](https://github.com/tunnckocore/is-typeof-error): Check that given value is any type of error and instanceof Error\n- [is-async-function](https://github.com/tunnckocore/is-async-function): Check that given function is async (callback) function or not. Trying to guess that based… [more](https://github.com/tunnckocore/is-async-function)\n- [kind-error](https://github.com/tunnckocore/kind-error): Correct inheriting from `Error`. Supports constructing from an object of properties - focused on assertion.\n- [kind-of-extra](https://github.com/tunnckocore/kind-of-extra): Extends `kind-of` type check utility with support for promises, generators, streams and errors. Like `kindof(Promise.resolve(1))… [more](https://github.com/tunnckocore/kind-of-extra)\n- [vez](https://github.com/tunnckocore/vez): Middleware composition at new level. Ultimate alternative to `ware`, `plugins`, `koa-compose` and `composition` packages. Allows… [more](https://github.com/tunnckocore/vez)\n\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/regexhq/hex-color-regex/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckocore.tk][author-www-img]][author-www-url] [![keybase tunnckocore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n\n[npmjs-url]: https://www.npmjs.com/package/hex-color-regex\n[npmjs-img]: https://img.shields.io/npm/v/hex-color-regex.svg?label=hex-color-regex\n\n[license-url]: https://github.com/regexhq/hex-color-regex/blob/master/LICENSE.md\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n\n[codeclimate-url]: https://codeclimate.com/github/regexps/hex-color-regex\n[codeclimate-img]: https://img.shields.io/codeclimate/github/regexps/hex-color-regex.svg\n\n[coverage-url]: https://codeclimate.com/github/regexps/hex-color-regex\n[coverage-img]: https://img.shields.io/codeclimate/coverage/github/regexps/hex-color-regex.svg\n\n[travis-url]: https://travis-ci.org/regexhq/hex-color-regex\n[travis-img]: https://img.shields.io/travis/regexhq/hex-color-regex.svg\n\n[coveralls-url]: https://coveralls.io/r/regexhq/hex-color-regex\n[coveralls-img]: https://img.shields.io/coveralls/regexhq/hex-color-regex.svg\n\n[david-url]: https://david-dm.org/regexhq/hex-color-regex\n[david-img]: https://img.shields.io/david/dev/regexhq/hex-color-regex.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/messages\n[new-message-img]: https://img.shields.io/badge/send%20me-message-green.svg\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/regexps/hex-color-regex.git"
  },
  "users": {
    "arteffeckt": true
  },
  "bugs": {
    "url": "https://github.com/regexps/hex-color-regex/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "hex-color-regex",
      "version": "1.0.0",
      "description": "Regular expression (regex) for matching hex color values from string.",
      "scripts": {
        "lint": "jshint index.js && jscs index.js --reporter inline",
        "test": "node test.js"
      },
      "author": {
        "name": "Charlike Make Reagent",
        "email": "mameto_100@mail.bg",
        "url": "https://github.com/tunnckoCore"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/regexps/hex-color-regex.git"
      },
      "keywords": [
        "color",
        "colors",
        "css",
        "expr",
        "expression",
        "expressions",
        "hex",
        "match",
        "matching",
        "regex",
        "regexp",
        "regexps",
        "regular",
        "web"
      ],
      "license": {
        "type": "MIT",
        "url": "https://github.com/regexps/hex-color-regex/blob/master/license.md"
      },
      "dependencies": {},
      "devDependencies": {
        "mukla": "~0.0.0"
      },
      "gitHead": "af241b1845b71b1b43ddc1b395577c4553824ce3",
      "bugs": {
        "url": "https://github.com/regexps/hex-color-regex/issues"
      },
      "homepage": "https://github.com/regexps/hex-color-regex",
      "_id": "hex-color-regex@1.0.0",
      "_shasum": "d9c28462957122a52541a882b4f2a631b8fc1cfa",
      "_from": ".",
      "_npmVersion": "2.1.16",
      "_nodeVersion": "0.11.14",
      "_npmUser": {
        "name": "tunnckocore",
        "email": "mameto_100@mail.bg"
      },
      "maintainers": [
        {
          "name": "tunnckocore",
          "email": "mameto_100@mail.bg"
        }
      ],
      "dist": {
        "shasum": "d9c28462957122a52541a882b4f2a631b8fc1cfa",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/hex-color-regex/-/hex-color-regex-1.0.0.tgz",
        "integrity": "sha512-AQ2+niVbRA3WWvPPL4JxgFPFfINEcIYf1/HDxRUMCh2+3DaErrtW9Kn6ufHbQ8ASyd07PaXP9rkKVrx1BxZdyg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIALlt61clHC2Ghs0mtO1DfPs9XjqS92479V0GeDKHlU2AiAyi+TqY9lUINxlIv/xm0z82BrduEoUexNCbEJJyuhG7w=="
          }
        ]
      },
      "directories": {}
    },
    "1.0.1": {
      "name": "hex-color-regex",
      "version": "1.0.1",
      "description": "Regular expression (regex) for matching hex color values from string.",
      "scripts": {
        "lint": "jshint index.js && jscs index.js --reporter inline",
        "test": "node test.js"
      },
      "author": {
        "name": "Charlike Make Reagent",
        "email": "mameto_100@mail.bg",
        "url": "https://github.com/tunnckoCore"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/regexps/hex-color-regex.git"
      },
      "keywords": [
        "color",
        "colors",
        "css",
        "expr",
        "expression",
        "expressions",
        "hex",
        "match",
        "matching",
        "regex",
        "regexp",
        "regexps",
        "regular",
        "web"
      ],
      "license": {
        "type": "MIT",
        "url": "https://github.com/regexps/hex-color-regex/blob/master/license.md"
      },
      "dependencies": {},
      "devDependencies": {
        "bluebird": "^2.9.14",
        "mukla": "~0.1.0"
      },
      "gitHead": "e61b6db4f479187a02aa1e5793917259d7c4f832",
      "bugs": {
        "url": "https://github.com/regexps/hex-color-regex/issues"
      },
      "homepage": "https://github.com/regexps/hex-color-regex",
      "_id": "hex-color-regex@1.0.1",
      "_shasum": "3647a4dd89413268b3dc0a9a6790d9ef8cff188d",
      "_from": ".",
      "_npmVersion": "2.7.0",
      "_nodeVersion": "1.5.1",
      "_npmUser": {
        "name": "tunnckocore",
        "email": "mameto_100@mail.bg"
      },
      "maintainers": [
        {
          "name": "tunnckocore",
          "email": "mameto_100@mail.bg"
        }
      ],
      "dist": {
        "shasum": "3647a4dd89413268b3dc0a9a6790d9ef8cff188d",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/hex-color-regex/-/hex-color-regex-1.0.1.tgz",
        "integrity": "sha512-gqoAVQawNAAPJ7twA4Crtd4TKfS4mUhaR260IwqiqH1plzAjoOkek7VuTQ2+4fZRFTxuLm6s8h5mNUJLx7vUlg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCfFj2ahD9iBgAZG+kyFFDyfUgfn8VtnEmo5TwPvcOZzwIgbT04ZsQ+NaU2DOK8ROdGtwuYy1qxzve1V8ONDEBgazo="
          }
        ]
      },
      "directories": {}
    },
    "1.0.2": {
      "name": "hex-color-regex",
      "version": "1.0.2",
      "description": "The best regular expression (regex) for matching hex color values from string.",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/regexps/hex-color-regex.git"
      },
      "author": {
        "name": "Charlike Mike Reagent",
        "email": "@tunnckoCore",
        "url": "http://www.tunnckocore.tk"
      },
      "main": "index.js",
      "license": "MIT",
      "scripts": {
        "test": "standard && node test.js"
      },
      "dependencies": {},
      "devDependencies": {
        "assertit": "^0.1.0"
      },
      "keywords": [
        "color",
        "colors",
        "css",
        "expr",
        "expression",
        "expressions",
        "hex",
        "match",
        "matching",
        "regex",
        "regexp",
        "regexps",
        "regular",
        "web"
      ],
      "gitHead": "983c5bfe4dac5d2fd77de7d5392c3df6343443e3",
      "bugs": {
        "url": "https://github.com/regexps/hex-color-regex/issues"
      },
      "homepage": "https://github.com/regexps/hex-color-regex#readme",
      "_id": "hex-color-regex@1.0.2",
      "_shasum": "7bfa9be3d40de9038dddfd97a4704eca3b379af8",
      "_from": ".",
      "_npmVersion": "2.10.0",
      "_nodeVersion": "2.0.0",
      "_npmUser": {
        "name": "tunnckocore",
        "email": "mameto_100@mail.bg"
      },
      "maintainers": [
        {
          "name": "tunnckocore",
          "email": "mameto_100@mail.bg"
        }
      ],
      "dist": {
        "shasum": "7bfa9be3d40de9038dddfd97a4704eca3b379af8",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/hex-color-regex/-/hex-color-regex-1.0.2.tgz",
        "integrity": "sha512-+GF69pJwwDgMYrm0zXP0HDRUdzUMjJjnoEkPiauYQC+Kbm49R9+javsgYsZ7FSzE8/gLMy4N5pSbrs2+47BjGg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIGb6DoW7cdbfix36B61PLMlsS9jk8tBqGQxEcWWYvmvsAiAKfAiN39helmv8CsHNoT3HyOHzYPsFb6DQSTbQ2yx2kw=="
          }
        ]
      },
      "directories": {}
    },
    "1.0.3": {
      "name": "hex-color-regex",
      "version": "1.0.3",
      "description": "The best regular expression (regex) for matching hex color values from string.",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/regexps/hex-color-regex.git"
      },
      "author": {
        "name": "Charlike Mike Reagent",
        "email": "@tunnckoCore",
        "url": "http://www.tunnckocore.tk"
      },
      "main": "index.js",
      "license": "MIT",
      "scripts": {
        "test": "standard && node test.js"
      },
      "dependencies": {},
      "devDependencies": {
        "assertit": "^0.1.0"
      },
      "keywords": [
        "color",
        "colors",
        "css",
        "expr",
        "expression",
        "expressions",
        "hex",
        "match",
        "matching",
        "regex",
        "regexp",
        "regexps",
        "regular",
        "web"
      ],
      "gitHead": "338c1bb55f7722405430085dec572a040a35e4a0",
      "bugs": {
        "url": "https://github.com/regexps/hex-color-regex/issues"
      },
      "homepage": "https://github.com/regexps/hex-color-regex#readme",
      "_id": "hex-color-regex@1.0.3",
      "_shasum": "2175693bc292fe06711b04faee9004790926f9b0",
      "_from": ".",
      "_npmVersion": "2.11.0",
      "_nodeVersion": "2.2.1",
      "_npmUser": {
        "name": "tunnckocore",
        "email": "mameto_100@mail.bg"
      },
      "maintainers": [
        {
          "name": "tunnckocore",
          "email": "mameto_100@mail.bg"
        }
      ],
      "dist": {
        "shasum": "2175693bc292fe06711b04faee9004790926f9b0",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/hex-color-regex/-/hex-color-regex-1.0.3.tgz",
        "integrity": "sha512-YJCMR6n7Gqrxp7HVggtxJF5XatzSrT3jX39hpLtEFQNf6x+xhlC07vI6omqDkjBtJrw8uCsCHYhppCsU+Y2m/w==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDQdnqd+6500U1taALBYM7uY6yenZABPCxFUC1XrJalpwIhAPYFcc1IAhDDNX/IcBrN6Rfxi40VbxzC5h7YFKKgn1Hl"
          }
        ]
      },
      "directories": {}
    },
    "1.1.0": {
      "name": "hex-color-regex",
      "version": "1.1.0",
      "description": "The best regular expression (regex) for matching hex color values from string.",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/regexps/hex-color-regex.git"
      },
      "author": {
        "name": "Charlike Mike Reagent",
        "email": "@tunnckoCore",
        "url": "http://www.tunnckocore.tk"
      },
      "main": "index.js",
      "license": "MIT",
      "scripts": {
        "test": "standard && node test.js"
      },
      "dependencies": {},
      "devDependencies": {
        "mukla": "^0.4.9"
      },
      "keywords": [
        "color",
        "colors",
        "css",
        "expr",
        "expression",
        "expressions",
        "hex",
        "match",
        "matching",
        "regex",
        "regexp",
        "regexps",
        "regular",
        "web"
      ],
      "gitHead": "07748c7d3f183b05510cb5a299803cebe520c539",
      "bugs": {
        "url": "https://github.com/regexps/hex-color-regex/issues"
      },
      "homepage": "https://github.com/regexps/hex-color-regex#readme",
      "_id": "hex-color-regex@1.1.0",
      "_npmVersion": "5.0.0",
      "_nodeVersion": "8.0.0",
      "_npmUser": {
        "name": "tunnckocore",
        "email": "mameto_100@mail.bg"
      },
      "dist": {
        "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==",
        "shasum": "4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/hex-color-regex/-/hex-color-regex-1.1.0.tgz",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDHlS5dut+LTTDOB1lFHKogjdEDWI+AwAl7IV9ZMxAYCQIhAMrLpfopF6RHAHxcQgDk0dShbx63urb6HguSuDI26gP+"
          }
        ]
      },
      "maintainers": [
        {
          "name": "tunnckocore",
          "email": "mameto_100@mail.bg"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/hex-color-regex-1.1.0.tgz_1496453605118_0.852321068290621"
      },
      "directories": {}
    }
  },
  "name": "hex-color-regex",
  "time": {
    "modified": "2026-05-24T07:56:30.037Z",
    "created": "2015-02-03T00:21:50.363Z",
    "1.0.0": "2015-02-03T00:21:50.363Z",
    "1.0.1": "2015-03-26T12:59:30.394Z",
    "1.0.2": "2015-06-01T14:56:43.391Z",
    "1.0.3": "2015-07-14T15:36:13.184Z",
    "1.1.0": "2017-06-03T01:33:26.075Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/regexps/hex-color-regex#readme"
}