{"_id":"d3-cam02","_rev":"9-d5937fe4c3902f29ec385c8f3fce041b","name":"d3-cam02","description":"CAM02 color space.","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"d3-cam02","version":"0.1.0","description":"CAM02 color space.","keywords":["d3","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"homepage":"https://github.com/connorgr/d3-cam02","license":"BSD-3-Clause","author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"main":"build/d3-cam02.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -n d3 -o build/d3-cam02.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-cam02.js -c -m -o build/d3-cam02.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cd ../d3.github.com && cp ../d3-cam02/build/d3-cam02.js d3-cam02.v0.1.js && cp ../d3-cam02/build/d3-cam02.min.js d3-cam02.v0.1.min.js && git add d3-cam02.v1.js d3-cam02.v1.min.js && git commit -m \"d3-cam02 ${VERSION}\" && git push && cd - && zip -j build/d3-cam02.zip -- LICENSE README.md build/d3-cam02.js build/d3-cam02.min.js"},"devDependencies":{"eslint":"2","package-preamble":"0.0","rollup":"0.34","tape":"4","uglify-js":"2"},"gitHead":"9004f6f9723045fb6dd876e8ab2d023bd1d54bd7","bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"_id":"d3-cam02@0.1.0","_shasum":"cfff9f70480cfb9953bd761c4ff86da0b8fc57bb","_from":".","_npmVersion":"3.8.8","_nodeVersion":"6.0.0","_npmUser":{"name":"connorgr","email":"connor@cs.brown.edu"},"dist":{"shasum":"cfff9f70480cfb9953bd761c4ff86da0b8fc57bb","tarball":"https://registry.npmjs.org/d3-cam02/-/d3-cam02-0.1.0.tgz","integrity":"sha512-vqEauEBy9cp7Noc/vDOZBHClTvsy5+N3Lwg8ToWtF+byBeD03pCDtIqJVvQF32N+z22zqrAgzTtV5AFgmzKPug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhbfMuguMS3754EWvfMWmEpDloEppjxSgM1FtwiltefAiAaydAzJpgzhnopH57R30mOFmJkNRt445QzWCcvXVWa4g=="}]},"maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/d3-cam02-0.1.0.tgz_1479245451470_0.2661718134768307"},"directories":{}},"0.1.1":{"name":"d3-cam02","version":"0.1.1","description":"CAM02 color space.","keywords":["d3","d3-module","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"homepage":"https://github.com/connorgr/d3-cam02","license":"BSD-3-Clause","author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"main":"build/d3-cam02.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-color:d3 -n d3 -o build/d3-cam02.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-cam02.js -c -m -o build/d3-cam02.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cd ../d3.github.com && cp ../d3-cam02/build/d3-cam02.js d3-cam02.v0.1.js && cp ../d3-cam02/build/d3-cam02.min.js d3-cam02.v0.1.min.js && git add d3-cam02.v1.js d3-cam02.v1.min.js && git commit -m \"d3-cam02 ${VERSION}\" && git push && cd - && zip -j build/d3-cam02.zip -- LICENSE README.md build/d3-cam02.js build/d3-cam02.min.js"},"dependencies":{"d3-color":"1"},"devDependencies":{"eslint":"2","package-preamble":"0.0","rollup":"0.34","tape":"4","uglify-js":"2"},"gitHead":"bb8edaf9b80daacf898da6f1a4c2f0529b7654c0","bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"_id":"d3-cam02@0.1.1","_shasum":"74ef1c58fb1063d748edccc84d987453aa971b70","_from":".","_npmVersion":"3.8.8","_nodeVersion":"6.0.0","_npmUser":{"name":"connorgr","email":"connor@cs.brown.edu"},"dist":{"shasum":"74ef1c58fb1063d748edccc84d987453aa971b70","tarball":"https://registry.npmjs.org/d3-cam02/-/d3-cam02-0.1.1.tgz","integrity":"sha512-q2rzltQvOszl5+FGMKFbWEqVYXPM6zqce11h0nWTwbvx2pZBvqJSFjEo5FpM4lUJ7tS547uL4X4vyr3jMKAQwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDtLU5plx8byWcXgCMmNwjnn/p9CrBK0wF1Ec/2hXRbwIgeLg4q+kOUchm8cjV2LYZ8Nh1CIJUg3ouyIemwkkIaUw="}]},"maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/d3-cam02-0.1.1.tgz_1479326124014_0.6627580414060503"},"directories":{}},"0.1.2":{"name":"d3-cam02","version":"0.1.2","description":"CAM02 color space.","keywords":["d3","d3-module","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"homepage":"https://github.com/connorgr/d3-cam02","license":"BSD-3-Clause","author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"main":"build/d3-cam02.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-color:d3 -n d3 -o build/d3-cam02.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-cam02.js -c -m -o build/d3-cam02.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && zip -j build/d3-cam02.zip -- LICENSE README.md build/d3-cam02.js build/d3-cam02.min.js"},"dependencies":{"d3-color":"1"},"devDependencies":{"eslint":"2","package-preamble":"0.0","rollup":"0.34","tape":"4","uglify-js":"2"},"gitHead":"bb8edaf9b80daacf898da6f1a4c2f0529b7654c0","bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"_id":"d3-cam02@0.1.2","_shasum":"91f687b9d9ff55ccd56caca90cab548e5a575655","_from":".","_npmVersion":"3.8.8","_nodeVersion":"6.0.0","_npmUser":{"name":"connorgr","email":"connor@cs.brown.edu"},"dist":{"shasum":"91f687b9d9ff55ccd56caca90cab548e5a575655","tarball":"https://registry.npmjs.org/d3-cam02/-/d3-cam02-0.1.2.tgz","integrity":"sha512-2M3a9ZRc+76oz3Sw80NX1og3aU/iWEN888PvmDg0LOz4blFWYUyaWaTX07YTLILtDlS8cQl16Kf0U3yGtYLs5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICjgOR6i6yyEEse6bVBB27B4y0cmFxdzFFm7S6+8F5oAAiB3PD5PkPxnJ4ASP8L+ihyX8wvsgXhai2XceprEDlAnbQ=="}]},"maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/d3-cam02-0.1.2.tgz_1479326275821_0.5673379488289356"},"directories":{}},"0.1.3":{"name":"d3-cam02","version":"0.1.3","description":"CAM02 color space.","keywords":["d3","d3-module","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"homepage":"https://github.com/connorgr/d3-cam02","license":"BSD-3-Clause","author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"main":"build/d3-cam02.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-color:d3 -n d3 -o build/d3-cam02.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-cam02.js -c -m -o build/d3-cam02.min.js","postpublish":"git push && git push --tags && zip -j build/d3-cam02.zip -- LICENSE README.md build/d3-cam02.js build/d3-cam02.min.js"},"dependencies":{"d3-color":"1"},"devDependencies":{"eslint":"3","package-preamble":"0.0","rollup":"0.34","tape":"4","uglify-js":"2"},"gitHead":"8e14e99288a54bb3e119cdc90b4dfa05f78e6149","bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"_id":"d3-cam02@0.1.3","_shasum":"4ad13ae33a66f0972ea4b3d296e51727fffdb6ad","_from":".","_npmVersion":"3.8.8","_nodeVersion":"6.0.0","_npmUser":{"name":"connorgr","email":"connor@cs.brown.edu"},"dist":{"shasum":"4ad13ae33a66f0972ea4b3d296e51727fffdb6ad","tarball":"https://registry.npmjs.org/d3-cam02/-/d3-cam02-0.1.3.tgz","integrity":"sha512-hEFU6UkT/Wcidzjm2PQQNNW7dV75h+59oIeef/PjDrO6p79kVgMUysC1QwSs795q0jOj/LsRUMHVM4FUFQbLUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEb6LbiKDIfKLzkncy8QIn6ADKqxM6bIdIsbR4x8yatKAiAf0gH97r5iRwbZbpkbWOOM6M9as8q8K54G+LtoBzv/dg=="}]},"maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/d3-cam02-0.1.3.tgz_1479390786240_0.9963703185785562"},"directories":{}},"0.1.4":{"name":"d3-cam02","version":"0.1.4","description":"CAM02 color space.","keywords":["d3","d3-module","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"homepage":"https://github.com/connorgr/d3-cam02","license":"BSD-3-Clause","author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"main":"build/d3-cam02.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-color:d3 -n d3 -o build/d3-cam02.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-cam02.js -c -m -o build/d3-cam02.min.js","postpublish":"git push && git push --tags && zip -j build/d3-cam02.zip -- LICENSE README.md build/d3-cam02.js build/d3-cam02.min.js"},"dependencies":{"d3-color":"1"},"devDependencies":{"eslint":"3","package-preamble":"0.0","rollup":"0.34","tape":"4","uglify-js":"2"},"gitHead":"73b9de57112ab795fab1ab313b5173bcfeded1cc","bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"_id":"d3-cam02@0.1.4","_shasum":"d3d7109abda1d151a8d4bcd2d8c7726f7f67431e","_from":".","_npmVersion":"3.8.8","_nodeVersion":"6.0.0","_npmUser":{"name":"connorgr","email":"connor@cs.brown.edu"},"dist":{"shasum":"d3d7109abda1d151a8d4bcd2d8c7726f7f67431e","tarball":"https://registry.npmjs.org/d3-cam02/-/d3-cam02-0.1.4.tgz","integrity":"sha512-qGVgNjwgLLu+WZv9e1Ae432cgmJGn9WsKUJaXg0vfgXkxhdu6vy6w37GmuHiO0stsCA7dMx0eg9NMgQecOlfPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0AZcaeEUKNnd82CIF7vfODgsYOlkPSG80RCkZm+7FVAiBDPTwgeXMXgXIaxbC5PXAdB1tseFEkgGpzJBY9Ce3+Jg=="}]},"maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/d3-cam02-0.1.4.tgz_1479390934460_0.6691514127887785"},"directories":{}},"0.1.5":{"name":"d3-cam02","version":"0.1.5","description":"CAM02 color space.","keywords":["d3","d3-module","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"homepage":"https://github.com/connorgr/d3-cam02","license":"BSD-3-Clause","author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"main":"build/d3-cam02.js","module":"index","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"scripts":{"pretest":"rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-color:d3 -n d3 -o build/d3-cam02.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-cam02.js -c -m -o build/d3-cam02.min.js","postpublish":"git push && git push --tags && zip -j build/d3-cam02.zip -- LICENSE README.md build/d3-cam02.js build/d3-cam02.min.js"},"dependencies":{"d3-color":"1"},"devDependencies":{"eslint":"3","package-preamble":"0.0","rollup":"0.34","tape":"4","uglify-js":"2"},"gitHead":"945951e95621bf5f8458cf11a458e1559d73b75e","bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"_id":"d3-cam02@0.1.5","_shasum":"e7eb34d06de03ad0c924134a0a84666d909681eb","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"connorgr","email":"connor@cs.brown.edu"},"dist":{"shasum":"e7eb34d06de03ad0c924134a0a84666d909681eb","tarball":"https://registry.npmjs.org/d3-cam02/-/d3-cam02-0.1.5.tgz","integrity":"sha512-EL/zXUN4lxtWqMRXsfSPs/bQ5dYbWFr1W6nA/0EGHbZ9TB6LdcNPuM5iCUrSeZUPoZuXOPMhrp9XDgYZnxOX3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHORa0JlxA12eOS9MdNn3AgnbJgfgesY1acXQqGEsiHCAiAhI8e1zySobVNgUtW2F1NlVAgtAr0RUeioJ7kwpEkGyQ=="}]},"maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-cam02-0.1.5.tgz_1501953582452_0.7879103769082576"},"directories":{}}},"readme":"# d3-cam02\n\nTo access the latest version of d3-cam02, grab it on\n[unpkg](https://unpkg.com/d3-cam02).\n\nThis module extends D3's native color support to also include CIECAM02 color.\nCIECAM02 is an updated color model that serves as an alternative to perceptually\nmodeled spaces like CIELAB and CIELCh.\nOne large difference compared to other perceptual color spaces is that it models\ncolors after transforming them through the CAT02 chromatic adaptation transform\nwhich simulates responses from the eye's long, medium, and short cone responses\n(LMS).\nBoth Jab and JCh assume average viewing conditions for the purposes of computing\nCAM02 color.\n\nBefore using this library, note that Jab and JCh are not Cartesian/polar space\ncorrelates of one another, because\n**the J in CIECAM02's JCh and in CIECAM02-UCS's Jab are not equivalent**.\nJab is calculated via M.R. Luo and C. Li's uniform color space transform to\nbetter approximate perceptual uniformity.\nFor an overview of CIECAM02, their transform, and comparisons to CIELAB, we\nrecommend Luo and Li's paper entitled \"CIECAM02 and Its Recent Developments\".\n\nd3-cam02 follows the same rules as d3-color. For example, to get the\nCIECAM02-UCS Jab representation of \"steelblue\":\n```js\nvar c = d3.jab(\"steelblue\"); // {r: 70, g: 130, b: 180, opacity: 1}\n```\n\nYou can also define Jab or JCh colors directly:\n```js\nvar c1 = d3.jab(80, 30, 10),\n    c2 = d3.jch(50, 70, 270);\n```\n\nJust as in d3-color, you can also directly manipulate colors once they are\ninitialized:\n```js\nvar c = d3.jab(80, 30, 10);\nc.J += 5;\nvar hue = (180 / Math.PI) * Math.atan2(c.b, c.a);\nc + \"\"; // transforms to RGB string formatting\n```\n\n## Installation\n###\n\nAfter downloading the repo, run ``npm install``, which will install any\ndependencies. You can optionally install from npm opposed to cloning directly\nfrom GitHub. Make sure to load d3-cam02 after d3-color.\n\n**Dependencies:** [d3-color](https://github.com/d3/d3-color)\n\n## API Reference\n###\n\nBecause this package extends d3-color, previously available color functions\nare similarly available in d3-cam02\n(e.g., <em>color</em>.{rgb, brighter, darker, displayable}).\n\n<a name=\"jab\" href=\"#jab\">#</a> d3.<b>jab</b>(<i>J</i>, <i>a</i>, <i>b</i>[, <i>opacity</i>]) [<>](https://github.com/connorgr/d3-cam02/blob/master/src/cam02.js#L404 \"Source\")<br>\n<a href=\"#jab\">#</a> d3.<b>jab</b>(<i>specifier</i>)<br>\n<a href=\"#jab\">#</a> d3.<b>jab</b>(<i>color</i>)<br>\n\nConstructs a new CIECAM02-UCS Jab color. The channel values are exposed as J, a\nand b properties on the returned instance. J refers to lightness, a refers to\nredness-to-greenness, and b refers to blueness-to-yellowness.\n\nIf J, a, and b are specified, these represent the channel values of the returned\ncolor; an opacity may also be specified. If a CSS Color Module Level 3 specifier\nstring is provided, it is parsed and then converted to the Lab color space. See\nd3-color for examples. If a color instance is specified, it is converted to the\nRGB color space using `color.rgb` and then converted to Jab. (Colors already in\nthe Jab color space skip the conversion to RGB.)\n\n<a name=\"jch\" href=\"#jch\">#</a> d3.<b>jch</b>(<i>J</i>, <i>C</i>, <i>h</i>[, <i>opacity</i>]) [<>](https://github.com/connorgr/d3-cam02/blob/master/src/cam02.js#L328 \"Source\")<br>\n<a href=\"#jch\">#</a> d3.<b>jch</b>(<i>specifier</i>)<br>\n<a href=\"#jch\">#</a> d3.<b>jch</b>(<i>color</i>)<br>\n\nConstructs a new CIECAM02 JCh color. The channel values are exposed as J, C, and\nh properties on the returned instance. J refers to a lightness definition\ndifferent than d3.jab, C refers to chroma, and h refers to hue.\nJab transform's JCh lightness with the following transform:\n``Jab.J = JCh.J / (1.0 + 0.007*(100.0 - JCh.J))``.\n\nIf J, C and h are specified, these represent the channel values of the returned\ncolor; an opacity may also be specified. If a CSS Color Module Level 3 specifier\nstring is provided, it is parsed and then converted to the Lab color space. See\nd3-color for examples. If a color instance is specified, it is converted to the\nRGB color space using `color.rgb` and then converted to JCh. (Colors already in\nthe JCh color space skip the conversion to RGB.)\n","maintainers":[{"name":"connorgr","email":"connor@cs.brown.edu"}],"time":{"modified":"2023-07-12T20:24:15.725Z","created":"2016-11-15T21:30:53.675Z","0.1.0":"2016-11-15T21:30:53.675Z","0.1.1":"2016-11-16T19:55:26.204Z","0.1.2":"2016-11-16T19:57:57.943Z","0.1.3":"2016-11-17T13:53:08.382Z","0.1.4":"2016-11-17T13:55:36.572Z","0.1.5":"2017-08-05T17:19:43.769Z"},"homepage":"https://github.com/connorgr/d3-cam02","keywords":["d3","d3-module","color","cam02","CIECAM02","cam02-ucs","CIECAM02-UCS"],"repository":{"type":"git","url":"git+https://github.com/connorgr/d3-cam02.git"},"author":{"name":"Connor Gramazio","url":"http://gramaz.io"},"bugs":{"url":"https://github.com/connorgr/d3-cam02/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md","users":{"flumpus-dev":true}}