{"id":13577601,"url":"https://github.com/larsenwork/postcss-easing-gradients","last_synced_at":"2025-05-15T16:05:56.924Z","repository":{"id":50509892,"uuid":"87653911","full_name":"larsenwork/postcss-easing-gradients","owner":"larsenwork","description":"PostCSS plugin to create smooth linear-gradients that approximate easing functions.","archived":false,"fork":false,"pushed_at":"2022-11-02T23:30:20.000Z","size":1207,"stargazers_count":966,"open_issues_count":14,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-05T04:36:15.997Z","etag":null,"topics":["css","gradients","postcss","postcss-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/postcss-easing-gradients","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/larsenwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-04-08T18:08:27.000Z","updated_at":"2025-05-03T15:42:24.000Z","dependencies_parsed_at":"2022-09-17T11:21:10.253Z","dependency_job_id":null,"html_url":"https://github.com/larsenwork/postcss-easing-gradients","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsenwork%2Fpostcss-easing-gradients","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsenwork%2Fpostcss-easing-gradients/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsenwork%2Fpostcss-easing-gradients/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsenwork%2Fpostcss-easing-gradients/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larsenwork","download_url":"https://codeload.github.com/larsenwork/postcss-easing-gradients/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374461,"owners_count":22060611,"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":["css","gradients","postcss","postcss-plugin"],"created_at":"2024-08-01T15:01:22.833Z","updated_at":"2025-05-15T16:05:56.896Z","avatar_url":"https://github.com/larsenwork.png","language":"JavaScript","readme":"# PostCSS Easing Gradients\n\n[![NPM Version][npm-img]][npm]\n[![NPM Monthly Downloads][dm-img]][npm]\n[![Build Status][ci-img]][ci]\n[![Dependency status][dpd-img]][dpd]\n\u003cbr\u003e\n[![MIT License][mit-img]][mit]\n[![Code Style: Prettier][prt-img]][prt]\n[![Follow Larsenwork on Twitter][twt-img]][twt]\n\n[PostCSS](https://github.com/postcss/postcss) plugin to create smooth linear-gradients that approximate easing functions.\nVisual examples and online editor on [larsenwork.com/easing-gradients](https://larsenwork.com/easing-gradients/)\n\n## Code Examples\n\n```css\n.cubic-bezier {\n  background: linear-gradient(to bottom, black, cubic-bezier(0.48, 0.3, 0.64, 1), transparent);\n  /* =\u003e */\n  background: linear-gradient(\n    to bottom,\n    hsl(0, 0%, 0%),\n    hsla(0, 0%, 0%, 0.94505) 7.9%,\n    hsla(0, 0%, 0%, 0.88294) 15.3%,\n    hsla(0, 0%, 0%, 0.81522) 22.2%,\n    hsla(0, 0%, 0%, 0.7426) 28.7%,\n    hsla(0, 0%, 0%, 0.66692) 34.8%,\n    hsla(0, 0%, 0%, 0.58891) 40.6%,\n    hsla(0, 0%, 0%, 0.50925) 46.2%,\n    hsla(0, 0%, 0%, 0.42866) 51.7%,\n    hsla(0, 0%, 0%, 0.34817) 57.2%,\n    hsla(0, 0%, 0%, 0.2693) 62.8%,\n    hsla(0, 0%, 0%, 0.19309) 68.7%,\n    hsla(0, 0%, 0%, 0.12126) 75.2%,\n    hsla(0, 0%, 0%, 0.05882) 82.6%,\n    hsla(0, 0%, 0%, 0.01457) 91.2%,\n    hsla(0, 0%, 0%, 0)\n  );\n}\n\n.ease {\n  background: linear-gradient(green, ease, red);\n  /* =\u003e */\n  background: linear-gradient(\n    hsl(120, 100%, 25.1%),\n    hsl(88.79, 100%, 24.28%) 7.8%,\n    hsl(69.81, 100%, 23.14%) 13.2%,\n    hsl(53.43, 100%, 24.55%) 17.6%,\n    hsl(42.52, 100%, 28.9%) 21.7%,\n    hsl(34.96, 100%, 32.64%) 25.8%,\n    hsl(29.1, 100%, 35.96%) 30.2%,\n    hsl(24.26, 100%, 38.94%) 35.1%,\n    hsl(20.14, 100%, 41.56%) 40.6%,\n    hsl(16.47, 100%, 43.87%) 46.9%,\n    hsl(13.13, 100%, 45.83%) 54.1%,\n    hsl(10.07, 100%, 47.42%) 62.2%,\n    hsl(7.23, 100%, 48.62%) 71.1%,\n    hsl(4.6, 100%, 49.43%) 80.6%,\n    hsl(2.16, 100%, 49.87%) 90.5%,\n    hsl(0, 100%, 50%)\n  );\n}\n\n.steps {\n  background: linear-gradient(to right, green, steps(4, skip-none), red);\n  /* =\u003e */\n  background: linear-gradient(\n    to right,\n    hsl(120, 100%, 25.1%),\n    hsl(120, 100%, 25.1%) 25%,\n    hsl(42.59, 100%, 28.87%) 25%,\n    hsl(42.59, 100%, 28.87%) 50%,\n    hsl(21.3, 100%, 40.82%) 50%,\n    hsl(21.3, 100%, 40.82%) 75%,\n    hsl(0, 100%, 50%) 75%,\n    hsl(0, 100%, 50%)\n  );\n}\n\n.radial {\n  background: radial-gradient(circle at top right, red, ease-in-out, blue);\n  /* =\u003e */\n  background: radial-gradient(\n    circle at top right,\n    hsl(0, 100%, 50%),\n    hsl(353.5, 100%, 49.71%) 7.7%,\n    hsl(347.13, 100%, 48.89%) 14.8%,\n    hsl(341.1, 100%, 47.69%) 21%,\n    hsl(335.24, 100%, 46.22%) 26.5%,\n    hsl(329.48, 100%, 44.57%) 31.4%,\n    hsl(323.63, 100%, 42.76%) 35.9%,\n    hsl(317.56, 100%, 40.82%) 40.1%,\n    hsl(310.92, 100%, 38.7%) 44.2%,\n    hsl(303.81, 100%, 36.49%) 48.1%,\n    hsl(296, 100%, 36.55%) 52%,\n    hsl(288.73, 100%, 38.81%) 56%,\n    hsl(282.14, 100%, 40.92%) 60.1%,\n    hsl(276.09, 100%, 42.84%) 64.3%,\n    hsl(270.27, 100%, 44.64%) 68.8%,\n    hsl(264.54, 100%, 46.28%) 73.7%,\n    hsl(258.7, 100%, 47.74%) 79.2%,\n    hsl(252.68, 100%, 48.92%) 85.4%,\n    hsl(246.32, 100%, 49.72%) 92.5%,\n    hsl(240, 100%, 50%)\n  );\n}\n```\n\n\u003cbr\u003e\n\n## Syntax\n\nCurrently a subset of the [full syntax](https://github.com/w3c/csswg-drafts/issues/1332#issuecomment-299990698) is supported:\n\n```xml\nlinear-gradient(\n  [ \u003cdirection\u003e,]?\n  \u003ccolor\u003e,\n  \u003canimation-timing-function\u003e,\n  \u003ccolor\u003e\n)\n```\n\nThe steps syntax is also being figured out and currently [this](https://github.com/w3c/csswg-drafts/issues/1680#issuecomment-361550637) is supported.\n\n\u003cbr\u003e\n\n## Usage\n\n```js\npostcss([require('postcss-easing-gradients')])\n```\n\nSee [PostCSS Usage](https://github.com/postcss/postcss#usage) docs for examples for your environment.\n\n\u003cbr\u003e\n\n## Options\n\n### colorStops: 15\n\nis the default. A lower number creates a more \"low poly\" gradient with less code but a higher risk of banding.\n\n### alphaDecimals: 5\n\nis the default. A lower number can result in banding.\n\n### colorMode: 'lrgb'\n\nis the default color space used for interpolation and is closest to what most browsers use. Other options are `'rgb', 'hsl', 'lab' and 'lch'` as per [chromajs documentation](http://gka.github.io/chroma.js/#chroma-mix)\n\n[ci-img]: https://img.shields.io/travis/larsenwork/postcss-easing-gradients.svg?branch=master\u0026longCache=true\u0026style=flat-square\n[ci]: https://travis-ci.org/larsenwork/postcss-easing-gradients\n[npm-img]: https://img.shields.io/npm/v/postcss-easing-gradients.svg?longCache=true\u0026style=flat-square\n[npm]: https://www.npmjs.com/package/postcss-easing-gradients\n[dm-img]: https://img.shields.io/npm/dm/postcss-easing-gradients.svg?longCache=true\u0026style=flat-square\n[dpd-img]: https://img.shields.io/david/larsenwork/postcss-easing-gradients.svg?longCache=true\u0026style=flat-square\n[dpd]: https://david-dm.org/larsenwork/postcss-easing-gradients\n[prt-img]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true\u0026style=flat-square\n[prt]: https://github.com/prettier/prettier\n[mit-img]: https://img.shields.io/github/license/larsenwork/postcss-easing-gradients.svg?longCache=true\u0026style=flat-square\n[mit]: https://github.com/larsenwork/postcss-easing-gradients/blob/master/LICENSE\n[twt-img]: https://img.shields.io/twitter/follow/larsenwork.svg?label=follow+larsenwork\u0026longCache=true\u0026style=flat-square\n[twt]: https://twitter.com/larsenwork\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarsenwork%2Fpostcss-easing-gradients","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarsenwork%2Fpostcss-easing-gradients","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarsenwork%2Fpostcss-easing-gradients/lists"}