{"_id":"postcss-colors-only","_rev":"1174632","name":"postcss-colors-only","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","dist-tags":{"latest":"1.1.4"},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"time":{"modified":"2024-12-21T05:45:57.000Z","created":"2015-08-28T01:47:52.221Z","1.1.4":"2023-07-22T22:18:09.831Z","1.0.0":"2023-06-01T02:46:12.069Z","0.0.3":"2015-08-30T13:07:33.419Z","0.0.2":"2015-08-29T14:13:47.365Z","0.0.1":"2015-08-28T12:54:55.001Z","0.0.0":"2015-08-28T01:47:52.221Z"},"users":{},"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"versions":{"1.1.4":{"name":"postcss-colors-only","version":"1.1.4","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","main":"index.js","keywords":["postcss","css","postcss-plugin","color"],"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"homepage":"https://github.com/rsanchez/postcss-colors-only","dependencies":{"css-color-extractor":"^1.1.4"},"peerDependencies":{"postcss":">=5.0.2 <8.0.0"},"scripts":{"lint":"eslint index.js","fix":"eslint index.js --fix","test":"jest"},"devDependencies":{"eslint":"^8.41.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.27.5","eslint-plugin-n":"^16.0.0","eslint-plugin-promise":"^6.1.1","jest":"^29.5.0"},"gitHead":"98791ccb2c60d210a74fb049f61491ee8da9a94d","_id":"postcss-colors-only@1.1.4","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Jy267qDv3bZcc6dxtzYbg5pES8DF5hfrC5MeclpMzyQfGplEe/oQaad/q/uvl6We7pnILcCtnTG4s5OQ+LhPVQ==","shasum":"800100d1b542cb53e456943508efce5ed047d98e","tarball":"http://registry-npm.ywwl.com/postcss-colors-only/download/postcss-colors-only-1.1.4.tgz","fileCount":6,"unpackedSize":7664,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIETU8y6Lsx5S21wJs7wgwOSHNoeQWuaUWEzcNEoyS2wIhALvKtvYqf8Vl13qon+Gkw6UoyHB92MMYYj603w31xi6r"}],"size":3035,"noattachment":false,"key":"/postcss-colors-only/-/postcss-colors-only-1.1.4.tgz"},"_npmUser":{"name":"rsanchez","email":"info@robsanchez.com"},"directories":{},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-colors-only_1.1.4_1690064289623_0.2427728341088089"},"_hasShrinkwrap":false,"publish_time":1690064289831,"_cnpm_publish_time":1690064289831},"1.0.0":{"name":"postcss-colors-only","version":"1.0.0","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","main":"index.js","keywords":["postcss","css","postcss-plugin","color"],"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"homepage":"https://github.com/rsanchez/postcss-colors-only","dependencies":{"css-color-extractor":"^1.1"},"peerDependencies":{"postcss":">=5.0.2 <8.0.0"},"scripts":{"lint":"eslint index.js","fix":"eslint index.js --fix","test":"jest"},"devDependencies":{"eslint":"^8.41.0","eslint-config-standard":"^17.1.0","eslint-plugin-import":"^2.27.5","eslint-plugin-n":"^16.0.0","eslint-plugin-promise":"^6.1.1","jest":"^29.5.0"},"gitHead":"338c1fa5070c5edab194626c4f9763aad1187e0e","_id":"postcss-colors-only@1.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-HapZWy1ZnvWjNkm/EGT0shzi5sK3/TLuHYS3PR9PDOozas+NYyEk4xFqVcj1k28aKDsbEgawcdrpXWk7xcZs2g==","shasum":"e76bd86450c4a47cf5b565baa386cf3a7d78abb2","tarball":"http://registry-npm.ywwl.com/postcss-colors-only/download/postcss-colors-only-1.0.0.tgz","fileCount":6,"unpackedSize":7518,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMvHzyLPWgL3Pall+5Soo/alzqB16y8EkXisi+zZpDAAiEAwUGrTmz35KaTZm3fZC/46flSr9Yh7XJ4dnd61eydrpE="}],"size":3014,"noattachment":false,"key":"/postcss-colors-only/-/postcss-colors-only-1.0.0.tgz"},"_npmUser":{"name":"rsanchez","email":"info@robsanchez.com"},"directories":{},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-colors-only_1.0.0_1685587571887_0.12585462490574484"},"_hasShrinkwrap":false,"publish_time":1685587572069,"_cnpm_publish_time":1685587572069},"0.0.3":{"name":"postcss-colors-only","version":"0.0.3","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","main":"index.js","keywords":["postcss","css","postcss-plugin","color"],"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"homepage":"https://github.com/rsanchez/postcss-colors-only","dependencies":{"postcss":"^5.0.2","css-color-extractor":"~0"},"devDependencies":{"chai":"^3.2.0","gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-mocha":"^2.1.3"},"scripts":{"test":"gulp"},"gitHead":"80c94a23cc978fce7424be24e90361cd53f47399","_id":"postcss-colors-only@0.0.3","_shasum":"24c713c21bfd16c0b2a3e883dd8a1033f4defe49","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"rsanchez","email":"info@robsanchez.com"},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"dist":{"shasum":"24c713c21bfd16c0b2a3e883dd8a1033f4defe49","tarball":"http://registry-npm.ywwl.com/postcss-colors-only/download/postcss-colors-only-0.0.3.tgz","integrity":"sha512-xd2v4Ojn4rOr7E3zwWykJwKMRyJgwkiaHNhToRB2L1u5G/PE8Rug7PkuEO/GVfTCYWb8eVCDfH0GHevK6BdAaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVy4LKHC+K6Qij8aefbtJtpKGpJrRvY66SHF3HQhek6QIgRhGRSL0jCoZDl9QcI+0Gp4fDMXIod/r176DLOhP3x3c="}],"size":4266,"noattachment":false,"key":"/postcss-colors-only/-/postcss-colors-only-0.0.3.tgz"},"directories":{},"publish_time":1440940053419,"_cnpm_publish_time":1440940053419},"0.0.2":{"name":"postcss-colors-only","version":"0.0.2","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","main":"index.js","keywords":["postcss","css","postcss-plugin","color"],"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"homepage":"https://github.com/rsanchez/postcss-colors-only","dependencies":{"postcss":"^5.0.2","css-color-extractor":"~0"},"devDependencies":{"chai":"^3.2.0","gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-mocha":"^2.1.3"},"scripts":{"test":"gulp"},"gitHead":"cac87d9c14bcae90a98c876f37b8d4c4de7fdd04","_id":"postcss-colors-only@0.0.2","_shasum":"025563e3e1bcec7242034d827798e9c14ff24558","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"rsanchez","email":"info@robsanchez.com"},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"dist":{"shasum":"025563e3e1bcec7242034d827798e9c14ff24558","tarball":"http://registry-npm.ywwl.com/postcss-colors-only/download/postcss-colors-only-0.0.2.tgz","integrity":"sha512-rhPvIlFhjMIX2uqsuDsTmOaRlJiBm920/joRU3ZbzPpZLEGloRf2rjt0TMjEB7SurglwPA6pn4UspbQVgDx9mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDI7pjtnkr9eNgHJJpE0I58IjLzZszHjwgI6DcyAHMjvAiEA6J7PUAj9oKW45EByFeu32nHaT1/KFjLHDXdVYQjIpQg="}],"size":4236,"noattachment":false,"key":"/postcss-colors-only/-/postcss-colors-only-0.0.2.tgz"},"directories":{},"publish_time":1440857627365,"_cnpm_publish_time":1440857627365},"0.0.1":{"name":"postcss-colors-only","version":"0.0.1","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","main":"index.js","keywords":["postcss","css","postcss-plugin","color"],"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"homepage":"https://github.com/rsanchez/postcss-colors-only","dependencies":{"postcss":"^5.0.2","css-color-list":"0.0.1","hex-color-regex":"^1.0.3","hsl-regex":"^1.0.0","hsla-regex":"^1.0.0","rgb-regex":"^1.0.1","rgba-regex":"^1.0.0"},"devDependencies":{"chai":"^3.2.0","gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-mocha":"^2.1.3"},"scripts":{"test":"gulp"},"gitHead":"2d77d5dc2d5daabd5483c4b64c6362dbc456b93a","_id":"postcss-colors-only@0.0.1","_shasum":"09543a2069e81bdb25ee98fb5f7dd711f3569884","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"rsanchez","email":"info@robsanchez.com"},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"dist":{"shasum":"09543a2069e81bdb25ee98fb5f7dd711f3569884","tarball":"http://registry-npm.ywwl.com/postcss-colors-only/download/postcss-colors-only-0.0.1.tgz","integrity":"sha512-SgLfxIXIifsxQBzpDslFpgfSprbFx1ySt5agq7c50E6fXhNpx0Z1iQylm/+D/BSCk5N5GRu0gjkKDPY26qJEVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC33STQT26CWU/tfsSZYcxmtBwfTf+dSH45XtBx2L4YGgIgHNMHklZ6Ih/0UIIhfnPhjQBWYFFWHSZ41xpD+lErMkk="}],"size":5100,"noattachment":false,"key":"/postcss-colors-only/-/postcss-colors-only-0.0.1.tgz"},"directories":{},"publish_time":1440766495001,"_cnpm_publish_time":1440766495001},"0.0.0":{"name":"postcss-colors-only","version":"0.0.0","description":"PostCSS plugin to remove all rules except those which contain one or more colors.","main":"index.js","keywords":["postcss","css","postcss-plugin","color"],"author":{"name":"Rob Sanchez","email":"info@robsanchez.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/rsanchez/postcss-colors-only.git"},"bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"homepage":"https://github.com/rsanchez/postcss-colors-only","dependencies":{"postcss":"^5.0.2","css-color-list":"0.0.1","hex-color-regex":"^1.0.3","hsl-regex":"^1.0.0","hsla-regex":"^1.0.0","rgb-regex":"^1.0.1","rgba-regex":"^1.0.0"},"devDependencies":{"chai":"^3.2.0","gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-mocha":"^2.1.3"},"scripts":{"test":"gulp"},"gitHead":"fe5ffd169147202dc7bbfe192c50afd70bab8ad5","_id":"postcss-colors-only@0.0.0","_shasum":"d516ee2adcbad647988f52a03c606979fa3d93a3","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"rsanchez","email":"info@robsanchez.com"},"maintainers":[{"name":"rsanchez","email":"info@robsanchez.com"}],"dist":{"shasum":"d516ee2adcbad647988f52a03c606979fa3d93a3","tarball":"http://registry-npm.ywwl.com/postcss-colors-only/download/postcss-colors-only-0.0.0.tgz","integrity":"sha512-hw8UD66945EDJF1zLr3fj4JFvgZHFibVlY7BrtA6Use5W8U47525mlz3o5TtJto48bpeAPq/tP7rm6xhmPK2FA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfJ79DrtQNCiWPYO+2fP2OFOQ2rOXmWhlDZ5M/M/q5pwIgbS/OiiTh4MwBt15GT+myaTupRKDLI5aShPAl5Uf9pH4="}],"size":5521,"noattachment":false,"key":"/postcss-colors-only/-/postcss-colors-only-0.0.0.tgz"},"directories":{},"publish_time":1440726472221,"_cnpm_publish_time":1440726472221}},"readme":"# PostCSS Colors Only\n\n[PostCSS] plugin to remove all rules except those which contain one or more colors.\n\nThis tool is useful if you are re-skinning a site with a new color scheme and need a starting point for a new stylesheet.\n\n[PostCSS]: https://github.com/postcss/postcss\n\n```css\n.foo {\n  color: red;\n  border: 1px solid #ab560f;\n  font-size: 16px;\n  background-image: linear-gradient(to-bottom, red, blue);\n}\n\n.bar {\n  color: rgba(0, 128, 255, 0.5);\n}\n\n.baz {\n  display: block;\n}\n```\n\n```css\n.foo {\n  color: red;\n  border-color: #ab560f;\n  background-image: linear-gradient(to-bottom, red, blue);\n}\n\n.bar {\n  color: rgba(0, 128, 255, 0.5);\n}\n```\n\nThis plugin will remove any CSS rules that do not contain a color (named, hex, rgb, rgba, hsl, or hsla) value. It looks at the following CSS properties for colors:\n\n* `color`\n* `background`\n* `background-color`\n* `background-image`\n* `border`\n* `border-top`\n* `border-right`\n* `border-bottom`\n* `border-left`\n* `border-color`\n* `border-top-color`\n* `border-right-color`\n* `border-bottom-color`\n* `border-left-color`\n* `outline`\n* `outline-color`\n* `text-decoration`\n* `text-decoration-color`\n* `text-shadow`\n* `box-shadow`\n* `fill`\n* `stroke`\n* `stop-color`\n* `flood-color`\n* `lighting-color`\n\nThe following CSS properties will be transformed, leaving only the color part of the declaration:\n\n* `background` → `background-color`\n* `border` → `border-color`\n* `border-top` → `border-top-color`\n* `border-right` → `border-right-color`\n* `border-bottom` → `border-bottom-color`\n* `border-left` → `border-left-color`\n* `outline` → `outline-color`\n* `text-decoration` → `text-decoration-color`\n\n## Installation\n\n[![NPM version](https://badge.fury.io/js/postcss-colors-only.svg)](https://www.npmjs.org/package/postcss-colors-only)\n\n[Use npm](https://www.npmjs.org/doc/cli/npm-install.html).\n\n```\nnpm install postcss-colors-only\n```\n\n## Usage\n\n```javascript\nvar postcss = require('postcss');\nvar colorsOnly = require('postcss-colors-only');\nvar options = {\n  withoutGrey: false, // set to true to remove rules that only have grey colors\n  withoutMonochrome: false, // set to true to remove rules that only have grey, black, or white colors\n  inverse: false, // set to true to remove colors from rules\n};\n\npostcss()\n  .use(colorsOnly(options))\n  .process('a { color: red; background: #FF0 url(foo.jpg); font-size: 12px; }')\n  .css;\n//=> 'a { color: red; background-color: #FF0; }'\n```\n\n## CLI\n\nThis plugin is also part of a standalone command line tool. See [css-color-extractor-cli](https://github.com/rsanchez/css-color-extractor-cli).\n\n## License\n\nCopyright (c) 2015 [Rob Sanchez](https://github.com/rsanchez)\n\nLicensed under [the MIT License](./LICENSE).\n","_attachments":{},"homepage":"https://github.com/rsanchez/postcss-colors-only","bugs":{"url":"https://github.com/rsanchez/postcss-colors-only/issues"},"license":"MIT"}