{"maintainers":[{"name":"moox","email":"m@moox.io"}],"keywords":["css","postcss","postcss-plugin","color","colour","function"],"dist-tags":{"latest":"3.0.0"},"author":{"name":"Maxime Thirouin"},"description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","readme":"# postcss-color-function [![Build Status](https://travis-ci.org/postcss/postcss-color-function.svg)](https://travis-ci.org/postcss/postcss-color-function)\n\n> [PostCSS](https://github.com/postcss/postcss) plugin to transform [W3C CSS color function][specs] to more compatible CSS.\n\n## Installation\n\n```console\n$ npm install postcss-color-function\n```\n\n## Usage\n\n```js\n// dependencies\nvar fs = require(\"fs\")\nvar postcss = require(\"postcss\")\nvar colorFunction = require(\"postcss-color-function\")\n\n// css to be processed\nvar css = fs.readFileSync(\"input.css\", \"utf8\")\n\n// process css\nvar output = postcss()\n  .use(colorFunction())\n  .process(css)\n  .css\n```\n\nUsing this `input.css`:\n\n```css\nbody {\n  background: color(red a(90%))\n}\n\n```\n\nyou will get:\n\n```css\nbody {\n  background: rgba(255, 0, 0, 0.9)\n}\n```\n\nCheckout [tests](test) for examples.\n\n## Interface (according to CSS specs)\n\n```\ncolor( [ <color> | <hue> ] <color-adjuster>* )\n```\n\n### List of `color-adjuster`\n\n- `[red( | green( | blue( | alpha( | a(] ['+' | '-']? [<number> | <percentage>] )`\n- `[red( | green( | blue( | alpha( | a(] '*' <percentage> )`\n- ~~`rgb( ['+' | '-'] [<number> | <percentage>]{3} )`~~ @todo\n- ~~`rgb( ['+' | '-'] <hash-token> )`~~ @todo\n- ~~`rgb( '*' <percentage> ) |`~~ @todo\n- `[hue( | h(] ['+' | '-' | '*']? <angle> )`\n- `[saturation( | s(] ['+' | '-' | '*']? <percentage> )`\n- `[lightness( | l(] ['+' | '-' | '*']? <percentage> )`\n- `[whiteness( | w(] ['+' | '-' | '*']? <percentage> )`\n- `[blackness( | b(] ['+' | '-' | '*']? <percentage> )`\n- `tint( <percentage> )`\n- `shade( <percentage> )`\n- `blend( <color> <percentage> [rgb | hsl | hwb]? )`\n- ~~`blenda( <color> <percentage> [rgb | hsl | hwb]? )`~~ @todo\n- `contrast( <percentage>? )`\n\nNotes:\n\n- some adjusts have shortcuts,\n- can be used on every value on any property,\n- some values can use add/subtract/scale modifiers or a direct value.\n\n[Read the specs][specs] for more information.\n\n### Examples\n\n```css\nwhatever {\n  color: color(red a(10%));\n\n  background-color: color(red lightness(50%)); /* == color(red l(50%)); */\n\n  border-color: color(hsla(125, 50%, 50%, .4) saturation(+ 10%) w(- 20%));\n}\n```\n\n## FAQ\n\n### Can you support `currentcolor` so we can do `color(currentcolor adjuster())`?\n\nNo we cannot do that. `currentcolor` depends on the cascade (so the DOM) and we can't handle that in a simple preprocessing step. You need to handle that with polyfills.\n\n### Can we use CSS custom properties so we can do `color(var(--mainColor) adjuster())`?\n\nBy using [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) before this plugin, you can do that (sort of).\nYou have some examples in [cssnext playground](http://cssnext.io/playground/).\n\n---\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n\n[specs]: http://dev.w3.org/csswg/css-color/#modifying-colors\n","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-color-function.git"},"users":{"asaupup":true,"danielbayley":true,"langri-sha":true},"bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"license":"MIT","versions":{"1.0.0":{"name":"postcss-color-function","version":"1.0.0","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugins","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"https://github.com/postcss/postcss-color-function.git"},"files":["CHANGELOG.md","LICENSE","README.md","index.js"],"dependencies":{"balanced-match":"^0.1.0","css-color-function":"^1.1.1"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","postcss":"^2.2.5","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test"},"gitHead":"134743f02beaa7fdca4e26db799d32bbcd8789c5","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function","_id":"postcss-color-function@1.0.0","_shasum":"5e9084e51be9ed901b17125cbc67ddad2895316d","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"5e9084e51be9ed901b17125cbc67ddad2895316d","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-1.0.0.tgz"},"directories":{}},"1.1.0":{"name":"postcss-color-function","version":"1.1.0","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugins","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"https://github.com/postcss/postcss-color-function.git"},"files":["CHANGELOG.md","LICENSE","index.js"],"dependencies":{"balanced-match":"^0.1.0","css-color-function":"^1.1.1","postcss-message-helpers":"^1.1.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","postcss":"^3.0.0","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test"},"gitHead":"c9994cfdcafe0b82310bd5bcb35c71645640a431","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function","_id":"postcss-color-function@1.1.0","_shasum":"faf713fb7538194600b200403edf17e9bd55ebca","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"faf713fb7538194600b200403edf17e9bd55ebca","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-1.1.0.tgz"},"directories":{}},"1.2.0":{"name":"postcss-color-function","version":"1.2.0","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugins","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"https://github.com/postcss/postcss-color-function.git"},"files":["CHANGELOG.md","LICENSE","index.js"],"dependencies":{"balanced-match":"^0.1.0","css-color-function":"^1.2.0","postcss-message-helpers":"^1.1.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","postcss":"^4.0.2","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test"},"gitHead":"13c9347823b5af9e075431af3ce11e49bbdbee7c","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function","_id":"postcss-color-function@1.2.0","_shasum":"96789cfc7a9417d24671ee22d227895793b192dd","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"96789cfc7a9417d24671ee22d227895793b192dd","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-1.2.0.tgz"},"directories":{}},"1.3.0":{"name":"postcss-color-function","version":"1.3.0","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugin","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-color-function.git"},"files":["CHANGELOG.md","LICENSE","index.js"],"dependencies":{"balanced-match":"^0.1.0","css-color-function":"^1.2.0","postcss":"^4.1.11","postcss-message-helpers":"^1.1.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test"},"gitHead":"f3f1c521c7684dff732aeda22360263ff0861dbc","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function#readme","_id":"postcss-color-function@1.3.0","_shasum":"3816818c2eb48ab66c24fc25835bc2789a79cc3f","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"3816818c2eb48ab66c24fc25835bc2789a79cc3f","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-1.3.0.tgz"},"directories":{}},"1.3.2":{"name":"postcss-color-function","version":"1.3.2","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugin","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-color-function.git"},"files":["CHANGELOG.md","LICENSE","index.js"],"dependencies":{"balanced-match":"^0.1.0","css-color-function":"^1.2.0","postcss":"^4.1.11","postcss-message-helpers":"^1.1.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test"},"gitHead":"58b78d73bc7f38b860cc63abea40b5c04fd70b80","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function#readme","_id":"postcss-color-function@1.3.2","_shasum":"60b3a1ce45dfb70404c7cedfe633dd685c6cc189","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.1","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"60b3a1ce45dfb70404c7cedfe633dd685c6cc189","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-1.3.2.tgz"},"directories":{}},"2.0.0":{"name":"postcss-color-function","version":"2.0.0","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugin","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-color-function.git"},"files":["index.js"],"dependencies":{"balanced-match":"^0.1.0","css-color-function":"^1.2.0","postcss":"^5.0.4","postcss-message-helpers":"^2.0.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test"},"gitHead":"f27b25d2e0ac5217dbacab63d094b76adbd5c0fd","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function#readme","_id":"postcss-color-function@2.0.0","_shasum":"d1e96f58f628474137738d3c0e160c5155207ec4","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.3.0","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"d1e96f58f628474137738d3c0e160c5155207ec4","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-2.0.0.tgz"},"directories":{}},"2.0.1":{"name":"postcss-color-function","version":"2.0.1","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugin","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-color-function.git"},"files":["index.js"],"dependencies":{"css-color-function":"^1.2.0","postcss":"^5.0.4","postcss-message-helpers":"^2.0.0","postcss-value-parser":"^3.3.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","npmpub":"^3.1.0","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test","release":"npmpub"},"gitHead":"ad1e58c1e25fd007a2c91acf168aba23cb371e12","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function#readme","_id":"postcss-color-function@2.0.1","_shasum":"9ad226f550e8a7c7f8b8a77860545b6dd7f55241","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"moox","email":"m@moox.io"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"dist":{"shasum":"9ad226f550e8a7c7f8b8a77860545b6dd7f55241","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-2.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/postcss-color-function-2.0.1.tgz_1458052291979_0.16653255512937903"},"directories":{}},"3.0.0":{"name":"postcss-color-function","version":"3.0.0","description":"PostCSS plugin to transform W3C CSS color function to more compatible CSS.","keywords":["css","postcss","postcss-plugin","color","colour","function"],"author":{"name":"Maxime Thirouin"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/postcss/postcss-color-function.git"},"files":["index.js"],"dependencies":{"css-color-function":"^1.2.0","postcss":"^5.0.4","postcss-message-helpers":"^2.0.0","postcss-value-parser":"^3.3.0"},"devDependencies":{"jscs":"^1.6.2","jshint":"^2.5.6","npmpub":"^3.1.0","tape":"^3.0.0"},"scripts":{"lint":"jscs *.js **/*.js && jshint . --exclude-path .gitignore","test":"npm run lint && tape test","release":"npmpub"},"gitHead":"539d571ab39a2759e62094fa2200c8dd586e09b3","bugs":{"url":"https://github.com/postcss/postcss-color-function/issues"},"homepage":"https://github.com/postcss/postcss-color-function#readme","_id":"postcss-color-function@3.0.0","_shasum":"3c6fb60c6ff2240e541d49f2926edcad8700f3a6","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"moox","email":"m@moox.io"},"dist":{"shasum":"3c6fb60c6ff2240e541d49f2926edcad8700f3a6","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/postcss-color-function/-/postcss-color-function-3.0.0.tgz"},"maintainers":[{"name":"moox","email":"m@moox.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/postcss-color-function-3.0.0.tgz_1485931921109_0.28177959052845836"},"directories":{}}},"name":"postcss-color-function","time":{"modified":"2017-02-01T06:52:03.031Z","created":"2014-10-04T05:58:05.770Z","1.0.0":"2014-10-04T05:58:05.770Z","1.1.0":"2014-11-25T07:52:14.182Z","1.2.0":"2015-03-12T06:16:47.458Z","1.3.0":"2015-06-15T07:41:19.734Z","1.3.1":"2015-07-08T05:25:05.515Z","1.3.2":"2015-07-08T05:28:58.683Z","2.0.0":"2015-09-07T05:01:35.711Z","2.0.1":"2016-03-15T14:31:35.656Z","3.0.0":"2017-02-01T06:52:03.031Z"},"readmeFilename":"README.md","homepage":"https://github.com/postcss/postcss-color-function#readme"}