{"id":13563796,"url":"https://github.com/csstools/postcss-color-functional-notation","last_synced_at":"2025-04-03T20:31:48.503Z","repository":{"id":45404496,"uuid":"132539217","full_name":"csstools/postcss-color-functional-notation","owner":"csstools","description":"Use space and slash separated color notation in CSS","archived":true,"fork":false,"pushed_at":"2021-12-16T12:07:32.000Z","size":68,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T00:49:43.428Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-08T01:56:24.000Z","updated_at":"2023-01-28T04:36:59.000Z","dependencies_parsed_at":"2022-09-10T11:40:35.347Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-color-functional-notation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-color-functional-notation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-color-functional-notation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-color-functional-notation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-color-functional-notation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-color-functional-notation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436333,"owners_count":20776987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:23.372Z","updated_at":"2025-04-03T20:31:48.170Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e⚠️ PostCSS Color Functional Notation was moved to \u003ca href=\"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation\n\"\u003e@csstools/postcss-plugins\u003c/a\u003e. ⚠️ \u003cbr\u003e\n\u003ca href=\"https://github.com/csstools/postcss-plugins/discussions/75\"\u003eRead the announcement\u003c/a\u003e\u003c/div\u003e\n\n# PostCSS Color Functional Notation [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[\u003cimg alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/postcss-color-functional-notation.svg\" height=\"20\"\u003e][npm-url]\n[\u003cimg alt=\"CSS Standard Status\" src=\"https://cssdb.org/badge/lab-function.svg\" height=\"20\"\u003e][css-url]\n[\u003cimg alt=\"Build Status\" src=\"https://github.com/csstools/postcss-color-functional-notation/workflows/test/badge.svg\" height=\"20\"\u003e][cli-url]\n[\u003cimg alt=\"Support Chat\" src=\"https://img.shields.io/badge/support-chat-blue.svg\" height=\"20\"\u003e][git-url]\n\n[PostCSS Color Functional Notation] lets you use space and slash separated\ncolor notation in CSS, following the [CSS Color] specification.\n\n```pcss\n:root {\n  --firebrick: rgb(178 34 34);\n  --firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n  --firebrick-hsl: hsla(0 68% 42%);\n  --firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n\n/* becomes */\n\n:root {\n  --firebrick: rgb(178, 34, 34);\n  --firebrick-a50: rgba(178, 34, 34, .5);\n  --firebrick-hsl: hsl(0, 68%, 42%);\n  --firebrick-hsl-a50: hsla(0, 68%, 42%, .5);\n}\n```\n\n## Usage\n\nAdd [PostCSS Color Functional Notation] to your project:\n\n```bash\nnpm install postcss-color-functional-notation --save-dev\n```\n\nUse [PostCSS Color Functional Notation] to process your CSS:\n\n```js\nconst postcss = require('postcss');\nconst postcssColorFunctionalNotation = require('postcss-color-functional-notation');\n\npostcss([\n  postcssColorFunctionalNotation(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Color Functional Notation] runs in all Node environments, with special instructions for:\n\n| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |\n| --- | --- | --- | --- | --- | --- |\n\n## Options\n\n### preserve\n\nThe `preserve` option determines whether the original functional color notation\nis preserved. By default, it is not preserved.\n\n```js\npostcssImageSetFunction({ preserve: true })\n```\n\n```pcss\n:root {\n  --firebrick: rgb(178 34 34);\n  --firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n  --firebrick-hsl: hsla(0 68% 42%);\n  --firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n\n/* becomes */\n\n:root {\n  --firebrick: rgb(178, 34, 34);\n  --firebrick: rgb(178 34 34);\n  --firebrick-a50: rgba(178, 34, 34, .5);\n  --firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n  --firebrick-hsl: hsl(0, 68%, 42%);\n  --firebrick-hsl: hsla(0 68% 42%);\n  --firebrick-hsl-a50: hsla(0, 68%, 42%, .5);\n  --firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n```\n\n[cli-url]: https://github.com/csstools/postcss-color-functional-notation/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#color-functional-notation\n[git-url]: https://gitter.im/postcss/postcss\n[npm-url]: https://www.npmjs.com/package/postcss-color-functional-notation\n\n[CSS Color]: https://drafts.csswg.org/css-color/#ref-for-funcdef-rgb%E2%91%A1%E2%91%A0\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Loader]: https://github.com/postcss/postcss-loader\n[PostCSS Color Functional Notation]: https://github.com/csstools/postcss-color-functional-notation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-color-functional-notation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-color-functional-notation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-color-functional-notation/lists"}