{"_id":"@cabinjs/color-convert","_rev":"4-964aa3ebd66a4675571fa544de4c4f7c","name":"@cabinjs/color-convert","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@cabinjs/color-convert","description":"Plain color conversion functions","version":"2.0.0","author":{"name":"Heather Arthur","email":"fayearthur@gmail.com"},"dependencies":{"color-name":"^1.1.3"},"devDependencies":{"@babel/cli":"^7.0.0-beta.51","@babel/core":"^7.0.0-beta.51","@babel/plugin-transform-template-literals":"^7.0.0-beta.51","@babel/preset-env":"^7.0.0-beta.51","caniuse-lite":"^1.0.30000856","chalk":"2.4.1","eslint":"^4.19.1","eslint-config-prettier":"^2.9.0","eslint-plugin-compat":"^2.4.0","eslint-plugin-prettier":"^2.6.0","prettier":"^1.13.5","remark-cli":"^5.0.0","remark-preset-github":"^0.0.8","rimraf":"^2.6.2","xo":"^0.21.1"},"engines":{"node":">=4"},"files":["lib"],"keywords":["ansi","ansi16","cmyk","color","colour","conversion","convert","converter","hsl","hsv","hwb","rgb"],"license":"MIT","main":"lib/index.js","remarkConfig":{"plugins":["preset-github"]},"repository":{"type":"git","url":"git+https://github.com/niftylettuce/color-convert.git"},"scripts":{"build":"rimraf lib && babel src --out-dir lib","lint":"xo && remark . -qfo && eslint lib","precommit":"npm test","test":"npm run build && npm run lint && node test/basic.js"},"xo":{"extends":"prettier","plugins":["prettier"],"parserOptions":{"sourceType":"script"},"env":["node"],"rules":{"prettier/prettier":["error",{"singleQuote":true,"bracketSpacing":true,"trailingComma":"none"}],"max-len":["error",{"code":80,"ignoreUrls":true}],"capitalized-comments":"off","camelcase":"off","no-warning-comments":"off","prefer-rest-params":"off","unicorn/number-literal-case":"off"},"space":true,"ignores":["lib/**"]},"gitHead":"17d211a57844fc600533937b17abf96b7ca6ad64","bugs":{"url":"https://github.com/niftylettuce/color-convert/issues"},"homepage":"https://github.com/niftylettuce/color-convert#readme","_id":"@cabinjs/color-convert@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"niftylettuce","email":"niftylettuce@gmail.com"},"dist":{"integrity":"sha512-EUhQxhVfT2pN19f/SuZaHWddEpwCPwtwJ3h19eQZt2y/L4nxNeZG93NZzis2DXUGIMJHbWLv+WS01hctuSPqkw==","shasum":"09f94e98fe510e16cb6b2c2c37645833152fdbdc","tarball":"https://registry.npmjs.org/@cabinjs/color-convert/-/color-convert-2.0.0.tgz","fileCount":7,"unpackedSize":103431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKzx4CRA9TVsSAnZWagAArlEP/RuXG2mzAlwjBI6C+de0\nw0gOcoZY2aQh2hMzycVtrN34IchtnUMJ04hfmNLQSMxBdlVE5f4V3LIYjMNk\nKWMOe0UbE+kTXa2bvVPLAfkr5tRGh06ujowvMq1bqExsKiVJdzzeiQkQi6/y\nppG/OKFsozcZiH1TihtSVnV5qHOWSZNXUOzc3NDm81dqyn27BmyT5O0/muYe\nqbj+6uVZPgTJIGetVNvm9Y/kxHLJH0el7dlFYLZB7m+hmMBwxVCPYsRFrylK\nNqFi3JmIIsbkBMwzk7jwhoQrOwOZf08U5NLMnDxBnGCD909QqzKP/fgRk/UY\nroXQI5yLmQmRUEw+D7cQqFrnpJjART7bhiU0MIqjLqJyYY432D2eey/CxONz\nPJ8niyP21pDAf0+KcF9i3rUGLrmTkxDs6ynoxhUIkuBhNZbTqWKTdzmV4/nd\nOvjgc3/FGgjM3EeEPkqOYa5HRo4aEj/wJGaNt/cdym0BQTCIsJNepqQ23RGO\nQvpQveN8ygrAPWyRBKm9yyoO4ZQ52BdY05GT0kQ+x+EP3F3/55KfqDjUfFcJ\nD0Gn3I1bN5BPLntCixkiYTgMu1xXpsdgiT9xOW349+l/kB8LWT5lpwHKxcTe\nzv6ogvKS0s5kK3dV3Clt4AomQJcL1wA8hwxcuu+pdvg2ZZV6RGNo4D+NV5pc\nbwWQ\r\n=2bg9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICddUCRPYEWRQEtIk+N5jeoeIKwKnK3yxXQHbXmZPbIYAiA7rSfGUOQ08ODPOGutLAlFsVGCF2CXzOskER2cr4v5Zw=="}]},"maintainers":[{"name":"niftylettuce","email":"niftylettuce@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/color-convert_2.0.0_1529560183622_0.6103900687179376"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-21T05:49:43.528Z","2.0.0":"2018-06-21T05:49:43.740Z","modified":"2022-04-04T21:28:02.172Z"},"maintainers":[{"email":"npm@titanism.com","name":"titanism"},{"email":"taylorschley@me.com","name":"shadowgate15"},{"email":"niftylettuce@gmail.com","name":"niftylettuce"},{"email":"sasnyde2@gmail.com","name":"spence-s"}],"description":"Plain color conversion functions","homepage":"https://github.com/niftylettuce/color-convert#readme","keywords":["ansi","ansi16","cmyk","color","colour","conversion","convert","converter","hsl","hsv","hwb","rgb"],"repository":{"type":"git","url":"git+https://github.com/niftylettuce/color-convert.git"},"author":{"name":"Heather Arthur","email":"fayearthur@gmail.com"},"bugs":{"url":"https://github.com/niftylettuce/color-convert/issues"},"license":"MIT","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\n## Install\n\n```sh\nnpm install color-convert\n```\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\n\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\n## Routing\n\nConversions that don't have an _explicitly_ defined conversion, 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 [index.js](src/index.js).\n","readmeFilename":"README.md"}