{"id":14968114,"url":"https://github.com/postcss/postcss-color-rgba-fallback","last_synced_at":"2025-04-09T20:14:55.267Z","repository":{"id":30434274,"uuid":"33987334","full_name":"postcss/postcss-color-rgba-fallback","owner":"postcss","description":"PostCSS plugin to transform rgba() to hexadecimal.","archived":false,"fork":false,"pushed_at":"2022-02-12T23:24:58.000Z","size":144,"stargazers_count":50,"open_issues_count":6,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-29T14:37:47.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-15T10:22:11.000Z","updated_at":"2023-01-25T00:41:16.000Z","dependencies_parsed_at":"2022-09-07T12:12:00.518Z","dependency_job_id":null,"html_url":"https://github.com/postcss/postcss-color-rgba-fallback","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-rgba-fallback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-rgba-fallback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-rgba-fallback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-color-rgba-fallback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postcss","download_url":"https://codeload.github.com/postcss/postcss-color-rgba-fallback/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657761,"owners_count":20974449,"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-24T13:39:19.149Z","updated_at":"2025-04-09T20:14:55.245Z","avatar_url":"https://github.com/postcss.png","language":"JavaScript","readme":"# postcss-color-rgba-fallback [![Travis Build Status](https://travis-ci.org/postcss/postcss-color-rgba-fallback.svg)](https://travis-ci.org/postcss/postcss-color-rgba-fallback)\n\n\u003e [PostCSS](https://github.com/postcss/postcss) plugin to transform rgba() to hexadecimal.\n\n## Installation\n\n```bash\n$ npm install postcss-color-rgba-fallback\n```\n\n## Usage\n\n```js\n// dependencies\nvar fs = require(\"fs\")\nvar postcss = require(\"postcss\")\nvar colorRgbaFallback = require(\"postcss-color-rgba-fallback\")\n\n// css to be processed\nvar css = fs.readFileSync(\"input.css\", \"utf8\")\n\n// process css\nvar output = postcss()\n  .use(colorRgbaFallback())\n  .process(css)\n  .css\n```\n\nUsing this `input.css`:\n\n```css\nbody {\n  background: rgba(153, 221, 153, 0.8);\n  border: solid 1px rgba(100,102,103,.3);\n}\n\n```\n\nyou will get:\n\n```css\nbody {\n  background: #99DD99;\n  background: rgba(153, 221, 153, 0.8);\n  border: solid 1px #646667;\n  border: solid 1px rgba(100,102,103,.3);\n}\n```\n\n## Node.js options\n\npostcss-color-rgba-fallback accepts options\n\n### `properties`\n\ndefault: `\n[ \"background-color\",\n  \"background\",\n  \"color\",\n  \"border\",\n  \"border-color\",\n  \"outline\",\n  \"outline-color ]\n`\n\nAllows you to specify your whitelist of properties.\n**This option enables adding a fallback for one or a properties list**\n\n### `oldie`\n\ndefault: `false`\n\nSet to true to enable the option and to get fallback for ie8\n\n### `backgroundColor`\n\ndefault: `null`\n\nAllows you to specify a background color to use as a base alpha matte.\n\nInstead of cutting off the alpha channel it will blend the foreground and background.\n\nExpects an array of rgb values:\n\n```js\n  \"backgroundColor\": [255, 1, 1]\n```\n\nCheckout [tests](test) for more examples.\n\n---\n\n## Contributing\n\nWork on a branch, install dev-dependencies, respect coding style \u0026 run tests before submitting a bug fix or a feature.\n\n    $ git clone https://github.com/postcss/postcss-color-rgba-fallback.git\n    $ git checkout -b patch-1\n    $ npm install\n    $ npm test\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-color-rgba-fallback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostcss%2Fpostcss-color-rgba-fallback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-color-rgba-fallback/lists"}