{
	"name": "pure-color",
	"versions": {
		"1.0.0": {
			"name": "pure-color",
			"description": "Pure functions for color conversion and parsing",
			"main": "index.js",
			"version": "1.0.0",
			"author": {
				"name": "Nick Williams"
			},
			"repository": {
				"type": "git",
				"url": "git+ssh://git@github.com/WickyNilliams/color-convert.git"
			},
			"devDependencies": {},
			"scripts": {
				"test": "node test/convert.js && node test/parse.js"
			},
			"keywords": [
				"color",
				"colour",
				"convert",
				"conversion",
				"converter",
				"rgb",
				"hsl",
				"hsv",
				"parse"
			],
			"gitHead": "5c029c1262fa39176e2838289f3cd311510546ff",
			"bugs": {
				"url": "https://github.com/WickyNilliams/color-convert/issues"
			},
			"homepage": "https://github.com/WickyNilliams/color-convert#readme",
			"_id": "pure-color@1.0.0",
			"_shasum": "389045ffdd6740454280c57b3c7bb76ee7a54df0",
			"_from": ".",
			"_npmVersion": "2.13.2",
			"_nodeVersion": "0.12.7",
			"_npmUser": {
				"name": "wickynilliams",
				"email": "wickynilliams@gmail.com"
			},
			"maintainers": [
				{
					"name": "wickynilliams",
					"email": "wickynilliams@gmail.com"
				}
			],
			"dist": {
				"shasum": "389045ffdd6740454280c57b3c7bb76ee7a54df0",
				"tarball": "https://registry.npmjs.org/pure-color/-/pure-color-1.0.0.tgz"
			},
			"directories": {},
			"contributors": []
		},
		"1.1.0": {
			"name": "pure-color",
			"description": "Pure functions for color conversion and parsing",
			"main": "index.js",
			"version": "1.1.0",
			"author": {
				"name": "Nick Williams"
			},
			"repository": {
				"type": "git",
				"url": "git+ssh://git@github.com/WickyNilliams/pure-color.git"
			},
			"devDependencies": {},
			"scripts": {
				"test": "node test/convert.js && node test/parse.js"
			},
			"keywords": [
				"color",
				"colour",
				"convert",
				"conversion",
				"converter",
				"rgb",
				"hsl",
				"hsv",
				"parse"
			],
			"gitHead": "4f30c2b240764bbb08f0f63170b6a3440096b2ac",
			"bugs": {
				"url": "https://github.com/WickyNilliams/pure-color/issues"
			},
			"homepage": "https://github.com/WickyNilliams/pure-color#readme",
			"_id": "pure-color@1.1.0",
			"_shasum": "002d8b40e2e71cad446e2f7cdaae143872689d5f",
			"_from": ".",
			"_npmVersion": "2.13.2",
			"_nodeVersion": "0.12.7",
			"_npmUser": {
				"name": "wickynilliams",
				"email": "wickynilliams@gmail.com"
			},
			"maintainers": [
				{
					"name": "wickynilliams",
					"email": "wickynilliams@gmail.com"
				}
			],
			"dist": {
				"shasum": "002d8b40e2e71cad446e2f7cdaae143872689d5f",
				"tarball": "https://registry.npmjs.org/pure-color/-/pure-color-1.1.0.tgz"
			},
			"directories": {},
			"contributors": []
		},
		"1.2.0": {
			"name": "pure-color",
			"description": "Pure functions for color conversion and parsing",
			"main": "index.js",
			"version": "1.2.0",
			"author": {
				"name": "Nick Williams"
			},
			"repository": {
				"type": "git",
				"url": "git+ssh://git@github.com/WickyNilliams/pure-color.git"
			},
			"license": "MIT",
			"devDependencies": {},
			"scripts": {
				"test": "node test/convert.js && node test/parse.js"
			},
			"keywords": [
				"color",
				"colour",
				"convert",
				"conversion",
				"converter",
				"rgb",
				"hsl",
				"hsv",
				"parse"
			],
			"gitHead": "1cb8634c73db78c12ec3df8c1bcf63d60cbb7987",
			"bugs": {
				"url": "https://github.com/WickyNilliams/pure-color/issues"
			},
			"homepage": "https://github.com/WickyNilliams/pure-color#readme",
			"_id": "pure-color@1.2.0",
			"_shasum": "702d2f2819dd545b1fde5116fca5f0c2dad2d18d",
			"_from": ".",
			"_npmVersion": "2.13.2",
			"_nodeVersion": "0.12.7",
			"_npmUser": {
				"name": "wickynilliams",
				"email": "wickynilliams@gmail.com"
			},
			"maintainers": [
				{
					"name": "wickynilliams",
					"email": "wickynilliams@gmail.com"
				}
			],
			"dist": {
				"shasum": "702d2f2819dd545b1fde5116fca5f0c2dad2d18d",
				"tarball": "https://registry.npmjs.org/pure-color/-/pure-color-1.2.0.tgz"
			},
			"directories": {},
			"contributors": []
		},
		"1.3.0": {
			"name": "pure-color",
			"description": "Pure functions for color conversion and parsing",
			"main": "index.js",
			"version": "1.3.0",
			"author": {
				"name": "Nick Williams"
			},
			"repository": {
				"type": "git",
				"url": "git+ssh://git@github.com/WickyNilliams/pure-color.git"
			},
			"license": "MIT",
			"devDependencies": {},
			"scripts": {
				"postversion": "git push origin master --tags && npm publish",
				"test": "node test/convert.js && node test/parse.js"
			},
			"keywords": [
				"color",
				"colour",
				"convert",
				"conversion",
				"converter",
				"rgb",
				"hsl",
				"hsv",
				"parse"
			],
			"gitHead": "22add01e19613a9a2297757cdb6882785338412f",
			"bugs": {
				"url": "https://github.com/WickyNilliams/pure-color/issues"
			},
			"homepage": "https://github.com/WickyNilliams/pure-color#readme",
			"_id": "pure-color@1.3.0",
			"_shasum": "1fe064fb0ac851f0de61320a8bf796836422f33e",
			"_from": ".",
			"_npmVersion": "3.10.8",
			"_nodeVersion": "6.2.1",
			"_npmUser": {
				"name": "wickynilliams",
				"email": "wickynilliams@gmail.com"
			},
			"maintainers": [
				{
					"name": "wickynilliams",
					"email": "wickynilliams@gmail.com"
				}
			],
			"dist": {
				"shasum": "1fe064fb0ac851f0de61320a8bf796836422f33e",
				"tarball": "https://registry.npmjs.org/pure-color/-/pure-color-1.3.0.tgz"
			},
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/pure-color-1.3.0.tgz_1497999443115_0.8928676818031818"
			},
			"directories": {},
			"contributors": []
		}
	},
	"time": {
		"modified": "2018-03-11T12:49:55.048Z",
		"created": "2015-10-07T19:45:47.619Z",
		"1.0.0": "2015-10-07T19:45:47.619Z",
		"1.1.0": "2015-10-14T16:32:54.212Z",
		"1.2.0": "2015-11-10T18:56:55.629Z",
		"1.3.0": "2017-06-20T22:57:24.586Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "1.3.0"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"a12b341e75f21b9bb7a4a8d44ba117b9\"",
			"fetched": 1600679317984
		}
	},
	"_distfiles": {
		"pure-color-1.0.0.tgz": {
			"url": "https://registry.npmjs.org/pure-color/-/pure-color-1.0.0.tgz",
			"sha": "389045ffdd6740454280c57b3c7bb76ee7a54df0",
			"registry": "npmjs"
		},
		"pure-color-1.1.0.tgz": {
			"url": "https://registry.npmjs.org/pure-color/-/pure-color-1.1.0.tgz",
			"sha": "002d8b40e2e71cad446e2f7cdaae143872689d5f",
			"registry": "npmjs"
		},
		"pure-color-1.2.0.tgz": {
			"url": "https://registry.npmjs.org/pure-color/-/pure-color-1.2.0.tgz",
			"sha": "702d2f2819dd545b1fde5116fca5f0c2dad2d18d",
			"registry": "npmjs"
		},
		"pure-color-1.3.0.tgz": {
			"url": "https://registry.npmjs.org/pure-color/-/pure-color-1.3.0.tgz",
			"sha": "1fe064fb0ac851f0de61320a8bf796836422f33e",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"pure-color-1.3.0.tgz": {
			"shasum": "1fe064fb0ac851f0de61320a8bf796836422f33e"
		}
	},
	"_rev": "2-4eeb98f907099567",
	"_id": "pure-color",
	"readme": "# pure-color\n\n[![Build Status](https://travis-ci.org/WickyNilliams/pure-color.svg)](https://travis-ci.org/WickyNilliams/pure-color)\n\n`pure-color` is a color conversion and parsing library for the browser and node. It offers conversions between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `xyz`, `lab`, `lch`, `hex`. It offers parsing of `rgb(a)`, `hex` and `hsl(a)` strings.\n\n## Installation\n\nInstall with npm:\n\n```bash\nnpm install pure-color --save\n```\n\n## Structure\n\nThe library is structured to allow requiring of just the functions you need. You can also require everything if file size is not a concern (e.g. node environment).\n\n```js\n// require everything\nvar color = require(\"pure-color\");\n\n// require all conversion functions\nvar convert = require(\"pure-color/convert\");\ncolor.convert === convert;\n\n//require all parse functions\nvar parse = require(\"pure-color/parse\");\ncolor.parse === parse;\n\n// require individual conversion function\nvar rgb2hsl = require(\"pure-color/convert/rgb2hsl\");\n\n// require individual parse function\nvar parseRgb = require(\"pure-color/parse/rgb\");\n```\n\n## API\n\n### Conversion\n\nThe majority of conversion functions have the signature `[Number] -> [Number]`. The exceptions are `rgb2string` and `rgb2hex`, whose signature is `[Number] -> String`.\n\nYou can see all available conversions in the [`convert` directory](convert).\n\n```js\nvar rgb2hsl = require(\"pure-color/convert/rgb2hsl\");\nvar rgb2hex = require(\"pure-color/convert/rgb2hex\");\n\nrgb2hsl([255, 0, 0]); // [0, 100, 50]\nrgb2hex([255, 0, 0]); // \"#ff0000\"\n```\n\n#### Hash\n\n`\"pure-color/convert\"` exports a hash of conversion functions keyed first by the \"from\" space, then by the \"to\" space:\n\n```js\nvar convert = require(\"pure-color/convert\");\n\nconvert.rgb.hsl([1, 2, 3]);\nconvert[\"rgb\"][\"hsl\"]([1, 2, 3]);\n```\n\n#### Notes\n\n##### Alpha values\n\nThe conversion functions make no effort to handle alpha values. For instance:\n\n```js\n// alpha value is lost in conversion...\nrgb2hsl([255, 0, 0, 0.5]) // [0, 100, 50]\n```\n\nThe reason for this is two-fold:\n\n1. Alpha value is orthogonal to color. A color with 50% opacity, is still the same color if it had 100% opacity.\n2. It is not clear how alpha values should be handled in some color spaces. For instance, does alpha make sense in CMYK space?\n\nYou must make effort to preserve alpha values between conversions yourself if this is important to you.\n\n##### Missing conversions\n\nAny conversions that are simple compositions of other conversions have been omitted.\n\nFor example, let's imagine we wanted to convert `hsl` to `cmyk`. This function doesn't exist, but it can be trivially created by composing `hsl2rgb` and `rgb2cmyk`:\n\n```js\nvar hsl2rgb = require(\"pure-color/convert/hsl2rgb\");\nvar rgb2cmyk = require(\"pure-color/convert/rgb2cmyk\");\n\n// define a new function composing the others\nfunction hsl2cmyk(hsl) {\n  return rgb2cmyk(hsl2rgb(hsl));\n}\n\n// or use a higher-order compose function\nvar hsl2cmyk = compose(rgb2cmyk, hsl2rgb);\n```\n\nIf there are missing conversions that cannot be achieved through composition, please raise an issue.\n\n### Parsing\n\nParse functions have signature `String -> [Number]`.\n\nA generic parsing function is available, which accepts `hsl`, `rgb`, and `hex` string formats. This always converts to `rgb` space for consistency - if you don't know what format the color is to begin with, you don't know what color space will be returned.\n\n```js\nvar parse = require(\"pure-color/parse\");\n\n// parse is a function itself which converts hsl/rgb/hex string to `[r, g, b, a]`\nparse(\"rgb(0, 0, 0)\")     // [0, 0, 0];\nparse(\"hsl(0, 0, 0)\")     // [0, 0, 0];\nparse(\"#000000\")          // [0, 0, 0];\n\n// it also handles alpha\nparse(\"rgba(0, 0, 0, 1)\") // [0, 0, 0, 1];\nparse(\"hsla(0, 0, 0, 1)\") // [0, 0, 0];\n```\n\nIndividual parsing functions are available if you know what format you will be parsing. Note that the `hsl` parse function returns an `hsl` array, whereas `rgb` and `hex` return an `rgb` array\n\n```js\nvar parse = require(\"pure-color/parse\");\nvar parseHsl = require(\"pure-color/parse/hex\");\n\nparseHsl(\"hsla(0, 0, 0, 1)\") // [0, 0, 0, 1]\nparse.hsl(\"hsla(0, 0, 0, 1)\") // [0, 0, 0, 1]\n\n```\n\n## Dependencies\n\nNo dependencies. Should work in any browser with ES5 support (which can be shimmed easily).\n\n## Motivation\n\nI have tried many color conversion/parsing libraries and I was not satisfied with any of them.\n\n* They're often wrapped up in awkward object-oriented APIs\n* They require that you include the entire library, when you often only want a subset of functionality\n\nThis library attempts to correct that by:\n\n* Offering pure functions with consistent signatures\n* Offer the bare minimum necessary functions\n* Allow requiring of only the functions you need, reducing file size\n\n## Contributions & Issues\n\n_Contributions are welcome from **everyone**_.\n\nIssues can be resolved quickest if they are descriptive and include both a reduced test case and a set of steps to reproduce. Personal help requests filed as issues will be declined.\n\nPlease clearly explain the purpose of any pull request. In lieu of a formal style guide, please follow the current coding style. Tests would be nice, but are not essential.\n\n## License\n\nLicensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php)"
}