{"id":15171885,"url":"https://github.com/postcss/postcss-color-hex-alpha","last_synced_at":"2026-01-11T04:48:35.017Z","repository":{"id":21237009,"uuid":"24552341","full_name":"postcss/postcss-color-hex-alpha","owner":"postcss","description":"Use 4 \u0026 8 character hex color notation in CSS","archived":true,"fork":false,"pushed_at":"2022-02-18T13:01:28.000Z","size":91,"stargazers_count":28,"open_issues_count":4,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T14:38:17.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"onlyice/asus-merlin-cross-the-gfw","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postcss.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":"2014-09-28T06:44:18.000Z","updated_at":"2023-01-28T02:57:58.000Z","dependencies_parsed_at":"2022-09-09T05:11:02.271Z","dependency_job_id":null,"html_url":"https://github.com/postcss/postcss-color-hex-alpha","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-hex-alpha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-hex-alpha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-hex-alpha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-hex-alpha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postcss","download_url":"https://codeload.github.com/postcss/postcss-color-hex-alpha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234837155,"owners_count":18894548,"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-09-27T09:21:11.354Z","updated_at":"2025-10-01T07:30:25.448Z","avatar_url":"https://github.com/postcss.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e⚠️ PostCSS Color Hex Alpha was moved to \u003ca href=\"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-hex-alpha\"\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 Hex Alpha [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![CSS Standard Status][css-img]][css-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[PostCSS Color Hex Alpha] lets you use 4 \u0026 8 character hex color notation in\nCSS, following the [CSS Color Module] specification.\n\n[!['Can I use' table](https://caniuse.bitsofco.de/image/css-rrggbbaa.png)](https://caniuse.com/#feat=css-rrggbbaa)\n\n```pcss\nbody {\n  background: #9d9c;\n}\n\n/* becomes */\n\nbody {\n  background: rgba(153, 221, 153, 0.8);\n}\n```\n\n## Usage\n\nAdd [PostCSS Color Hex Alpha] to your project:\n\n```bash\nnpm install postcss-color-hex-alpha --save-dev\n```\n\nUse [PostCSS Color Hex Alpha] to process your CSS:\n\n```js\nconst postcss = require('postcss');\nconst postcssColorHexAlpha = require('postcss-color-hex-alpha');\n\npostcss([\n  postcssColorHexAlpha(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Color Hex Alpha] 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 4 \u0026 8 character hex color notation\nshould be preserved in their original form. By default, these are not preserved.\n\n```js\npostcssColorHexAlpha({\n  preserve: true\n});\n```\n\n```pcss\nbody {\n  background: #9d9c;\n}\n\n/* becomes */\n\nbody {\n  background: rgba(153, 221, 153, 0.8);\n  background: #9d9c;\n}\n```\n\n[cli-img]: https://github.com/postcss/postcss-color-hex-alpha/workflows/test/badge.svg\n[cli-url]: https://github.com/postcss/postcss-color-hex-alpha/actions/workflows/test.yml?query=workflow/test\n[css-img]: https://cssdb.org/images/badges/hexadecimal-alpha-notation.svg\n[css-url]: https://cssdb.org/#hexadecimal-alpha-notation\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/postcss-color-hex-alpha.svg\n[npm-url]: https://www.npmjs.com/package/postcss-color-hex-alpha\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Color Hex Alpha]: https://github.com/postcss/postcss-color-hex-alpha\n[CSS Color Module]: https://www.w3.org/TR/css-color-4/#hex-notation\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-color-hex-alpha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostcss%2Fpostcss-color-hex-alpha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-color-hex-alpha/lists"}