motion
Version:
motion - moving development forward
58 lines (57 loc) • 3.48 kB
JSON
{
"_args": [
[
"color-convert@https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "color-convert@>=0.5.3 <0.6.0",
"_id": "color-convert@0.5.3",
"_inCache": true,
"_location": "/color-convert",
"_phantomChildren": {},
"_requested": {
"name": "color-convert",
"raw": "color-convert@https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
"rawSpec": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
"type": "remote"
},
"_requiredBy": [
"/color"
],
"_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
"_shasum": "bdb6c69ce660fadffe0b0007cc447e1b9f7282bd",
"_shrinkwrap": null,
"_spec": "color-convert@https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"email": "fayearthur@gmail.com",
"name": "Heather Arthur"
},
"bugs": {
"url": "https://github.com/harthur/color-convert/issues"
},
"dependencies": {},
"description": "Plain color conversion functions",
"devDependencies": {},
"homepage": "https://github.com/harthur/color-convert#readme",
"keywords": [
"color",
"colour",
"rgb"
],
"name": "color-convert",
"optionalDependencies": {},
"readme": "# color-convert [](https://travis-ci.org/harthur/color-convert)\nColor-convert is a color conversion library for JavaScript and node. It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, and CSS keywords:\n\n```js\nvar converter = require(\"color-convert\")();\n\nconverter.rgb(140, 200, 100).hsl() // [96, 48, 59]\n\nconverter.keyword(\"blue\").rgb() // [0, 0, 255]\n```\n\n# Install\n\n```console\nnpm install color-convert\n```\n\n# API\n\nColor-convert exports a converter object with getter/setter methods for each color space. It caches conversions:\n\n```js\nvar converter = require(\"color-convert\")();\n\nconverter.rgb(140, 200, 100).hsl() // [96, 48, 59]\n\nconverter.rgb([140, 200, 100]) // args can be an array\n```\n\n### Plain functions\nGet direct conversion functions with no fancy objects:\n\n```js\nrequire(\"color-convert\").rgb2hsl([140, 200, 100]); // [96, 48, 59]\n```\n\n### Unrounded\nTo get the unrounded conversion, append `Raw` to the function name:\n\n```js\nconvert.rgb2hslRaw([140, 200, 100]); // [95.99999999999999, 47.619047619047606, 58.82352941176471]\n```\n\n### Hash\nThere's also a hash of the conversion functions keyed first by the \"from\" color space, then by the \"to\" color space:\n\n```js\nconvert[\"hsl\"][\"hsv\"]([160, 0, 20]) == convert.hsl2hsv([160, 0, 20])\n```\n\n### Other spaces\n\nThere are some conversions from rgb (sRGB) to XYZ and LAB too, available as `rgb2xyz()`, `rgb2lab()`, `xyz2rgb()`, and `xyz2lab()`.\n\n# Contribute\n\nPlease fork, add conversions, figure out color profile stuff for XYZ, LAB, etc. This is meant to be a basic library that can be used by other libraries to wrap color calculations in some cool way.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/harthur/color-convert.git"
},
"scripts": {
"test": "node test/basic.js"
},
"version": "0.5.3"
}