{"name":"color-convert","description":"Plain color conversion functions","version":"0.3.4","author":{"name":"Heather Arthur","email":"fayearthur@gmail.com"},"repository":{"type":"git","url":"http://github.com/harthur/color-convert.git"},"main":"./index","devDependencies":{"browserify":">=1.0.0","uglify-js":"1.0.x"},"keywords":["color","colour","rgb"],"bugs":{"url":"https://github.com/harthur/color-convert/issues"},"homepage":"https://github.com/harthur/color-convert","_id":"color-convert@0.3.4","dist":{"shasum":"e5e3ab2028a57bc68d904bbfbf2ed7fd5a31a26c","tarball":"http://registry-npm.ywwl.com/color-convert/download/color-convert-0.3.4.tgz","integrity":"sha512-HP0LFUapyR/0VJ4t5httwu4gF24EYhNE+3lBm1ILtGPq7fzOUgcV1hziYjKq5xZk/8k7/btNpt+iE7VTAeApeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZDhSPyiH203kvVkSKnHGrgUN+sMb15kTsQv6xL/2R7AIhALPQvZrBpgz9Yv0kvT71nQs+hXLNjaKnF+GU7IfTSXjc"}],"size":13517,"noattachment":false,"key":"/color-convert/-/color-convert-0.3.4.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"harth","email":"fayearthur@gmail.com"},"maintainers":[{"name":"harth","email":"fayearthur@gmail.com"}],"directories":{},"readme":"# color-convert\n\n[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)\n\nColor-convert is a color conversion library for JavaScript and node.\nIt converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):\n\n```js\nvar convert = require('color-convert');\n\nconvert.rgb.hsl(140, 200, 100);             // [96, 48, 59]\nconvert.keyword.rgb('blue');                // [0, 0, 255]\n\nvar rgbChannels = convert.rgb.channels;     // 3\nvar cmykChannels = convert.cmyk.channels;   // 4\nvar ansiChannels = convert.ansi16.channels; // 1\n```\n\n# Install\n\n```console\n$ npm install color-convert\n```\n\n# API\n\nSimply get the property of the _from_ and _to_ conversion that you're looking for.\n\nAll functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.\n\nAll 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).\n\n```js\nvar convert = require('color-convert');\n\n// Hex to LAB\nconvert.hex.lab('DEADBF');         // [ 76, 21, -2 ]\nconvert.hex.lab.raw('DEADBF');     // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]\n\n// RGB to CMYK\nconvert.rgb.cmyk(167, 255, 4);     // [ 35, 0, 98, 0 ]\nconvert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]\n```\n\n### Arrays\nAll functions that accept multiple arguments also support passing an array.\n\nNote that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)\n\n```js\nvar convert = require('color-convert');\n\nconvert.rgb.hex(123, 45, 67);      // '7B2D43'\nconvert.rgb.hex([123, 45, 67]);    // '7B2D43'\n```\n\n## Routing\n\nConversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).\n\nKeep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of \"direct\" (single-step) conversions, see [conversions.js](conversions.js).\n\n# Contribute\n\nIf there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.\n\n# License\nCopyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).\n","publish_time":1396650162008,"_cnpm_publish_time":1396650162008,"dist-tags":{"latest":"3.1.3"}}