{"name":"@csstools/postcss-contrast-color-function","version":"3.0.13","keywords":["contrast","contrast-color","css","postcss-plugin","wcag"],"license":"MIT-0","_id":"@csstools/postcss-contrast-color-function@3.0.13","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-contrast-color-function#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"6420555fd87bec9b27f280b3441b6bb4b9b861b9","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-contrast-color-function/download/@csstools/postcss-contrast-color-function-3.0.13.tgz","fileCount":6,"integrity":"sha512-+8V3jXAGpqpPVCX+ewkUk/s6Ly99wg6dCEX2gIqRQp9eqf6wO/mqtp7YPV0xa2i/wGL/pTCQuXRamObdQQO5tA==","signatures":[{"sig":"MEYCIQDmS0r1YrPWwxwS0NAAv46gh6BuAwRKQTg63Kz095ELiAIhAJkIdiM7AFvdoh0Q/vI/Z4g7BchCQPBR7hHNLY4fYF0H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFtPDAKZDB9lk1rw4sXsm9HAExs/jrMMez0CmqVfngshAiADje6zI6fDeYZkfD1hdL61U/7e6PHkt2yx95Q3b0jKhw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7263,"size":2883,"noattachment":false,"key":"/@csstools/postcss-contrast-color-function/-/@csstools/postcss-contrast-color-function-3.0.13.tgz"},"type":"module","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"cee642989b8859ff2c00284b473be961aa9a0c2d","scripts":{},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-contrast-color-function"},"_npmVersion":"11.13.0","description":"Dynamically specify a text color with adequate contrast","directories":{},"_nodeVersion":"26.1.0","dependencies":{"@csstools/utilities":"^3.0.0","@csstools/css-tokenizer":"^4.0.2","@csstools/css-color-parser":"^4.2.4","@csstools/css-parser-algorithms":"^4.0.1","@csstools/postcss-progressive-custom-properties":"^5.1.3"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"tmp":"tmp/postcss-contrast-color-function_3.0.13_1790347694296_0.22201107385642005","host":"s3://npm-registry-packages-npm-production"},"readme":"# PostCSS Contrast Color Function [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n`npm install @csstools/postcss-contrast-color-function --save-dev`\n\n[PostCSS Contrast Color Function] lets you dynamically specify a text color with adequate contrast following the [CSS Color 5 Specification].\n\n```css\n.color {\n\tcolor: contrast-color(oklch(82% 0.2 330));\n}\n\n/* becomes */\n\n.color {\n\tcolor: rgb(0, 0, 0);\n\tcolor: contrast-color(oklch(82% 0.2 330));\n}\n```\n\n## Usage\n\nAdd [PostCSS Contrast Color Function] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-contrast-color-function --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssContrastColorFunction = require('@csstools/postcss-contrast-color-function');\n\npostcss([\n\tpostcssContrastColorFunction(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\n\n## Options\n\n### preserve\n\nThe `preserve` option determines whether the original notation\nis preserved. By default, it is preserved.\n\n```js\npostcssContrastColorFunction({ preserve: false })\n```\n\n```css\n.color {\n\tcolor: contrast-color(oklch(82% 0.2 330));\n}\n\n/* becomes */\n\n.color {\n\tcolor: rgb(0, 0, 0);\n}\n```\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#contrast-color-function\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-contrast-color-function\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Contrast Color Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-contrast-color-function\n[CSS Color 5 Specification]: https://drafts.csswg.org/css-color-5/#contrast-color\n","publish_time":1790347694384,"_cnpm_publish_time":1790347694384,"dist-tags":{"latest":"3.0.17"}}