{"id":18705202,"url":"https://github.com/hsluv/hsluv-sass","last_synced_at":"2025-11-09T05:30:32.819Z","repository":{"id":49604798,"uuid":"61267102","full_name":"hsluv/hsluv-sass","owner":"hsluv","description":"Sass implementation of HSLuv (revision 4)","archived":false,"fork":false,"pushed_at":"2022-12-07T14:38:50.000Z","size":86,"stargazers_count":37,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-28T06:27:59.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"SCSS","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/hsluv.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":"2016-06-16T06:13:55.000Z","updated_at":"2023-07-03T12:21:09.000Z","dependencies_parsed_at":"2023-01-24T08:00:43.696Z","dependency_job_id":null,"html_url":"https://github.com/hsluv/hsluv-sass","commit_stats":null,"previous_names":["apexskier/husl-sass"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsluv%2Fhsluv-sass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsluv%2Fhsluv-sass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsluv%2Fhsluv-sass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsluv%2Fhsluv-sass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hsluv","download_url":"https://codeload.github.com/hsluv/hsluv-sass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239568033,"owners_count":19660599,"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-11-07T12:10:01.656Z","updated_at":"2025-11-09T05:30:32.755Z","avatar_url":"https://github.com/hsluv.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HSLuv Sass\n[![Build Status](https://github.com/hsluv/hsluv-sass/actions/workflows/ci.yml/badge.svg)](https://github.com/hsluv/hsluv-sass/actions/workflows/ci.yml?query=branch%3Amaster)\n[![Package Version](https://img.shields.io/npm/v/hsluv-sass.svg)](https://www.npmjs.com/package/hsluv-sass)\n\nPure Sass [HSLuv](http://www.hsluv.org) implementation.\n\nThis package attempts to match the canonical implementation as closely as possible,\nbut not break sass best practices and common patterns. Important deviations\ninclude\n\n- RGB color components range from 0 to 255, not 0 to 1\n- Testing precision is lowered significantly\n\n## Usage\n\n### Installation\n\n```\nnpm install hsluv-sass\n```\n\n### Example\n\nCreate `demo.csss`:\n\nWith [`@use`](https://sass-lang.com/documentation/at-rules/use):\n\n```scss\n@use \"./node_modules/hsluv-sass\" as hsluv;\n\n.example {\n  color: hsluv.hsluv(23.2, 83.4%, 43.7%);\n  background-color: hsluv.hpluv(250.4, 100%, 59.1%);\n}\n```\n\nWith [`@import`](https://sass-lang.com/documentation/at-rules/import):\n\n```scss\n@import \"./node_modules/hsluv-sass\";\n\n.example {\n  color: hsluv(23.2, 83.4%, 43.7%);\n  background-color: hpluv(250.4, 100%, 59.1%);\n}\n```\n\nCompile:\n\n```bash\n$ npx sass demo.scss \n```\n\nEmitted css:\n\n```css\n.example {\n  color: #a84c27;\n  background-color: #738fc0;\n}\n```\n\n### API\n\n```scss\nhsluv($hue, $saturation, $lightness) //=\u003e color\n```\n\nCreates a sass color object in HSLuv color space. \n\n```scss\nhpluv($hue, $saturation, $lightness) //=\u003e color\n```\n\nCreates a sass color object in HPLuv color space. \n\n```scss\nhsluva($hue, $saturation, $lightness, $alpha: 1) //=\u003e color\n```\n\nCreates a sass color object in HSLuv color space with transparency.\n\n```scss\nhpluva($hue, $saturation, $lightness, $alpha: 1) //=\u003e color\n```\n\nCreates a sass color object in HPLuv color space with transparency. \n\n#### Parameters\n\n- `$hue` — The hue of the color. A number between 0 and 360 degrees, inclusive.\n- `$saturation` — The saturation of the color. Must be a number between 0% and 100%, inclusive.\n- `$lightness` — The lightness of the color. Must be a number between 0% and 100%, inclusive.\n- `$alpha` - The opacity of the color. Must be a number between 0 and 1, inclusive.\n\nAll function support passing an HSL map directly and omitting the `$saturation` and `$lightness` parameters. If unitless, the `h` value must be in radians.\n\n```scss\n.example {\n  color: hsluv((h: 0.4049164, s: 83.4, l: 43.7));\n  background-color: hpluv((h: 4.3703044, s: 100, l: 59.1));\n}\n```\n\n## Testing\n\nTested with [True](https://www.oddbird.net/true/docs/).\nContinuous integration tests againsts the last several version of node on multiple platforms.\n\nYou can locally test after installing npm dependencies. Just run\n`npm test`.\n\n## Support\n\nHave a question or need help? [Open an issue](https://github.com/hsluv/hsluv-sass/issues/new)\n\n## License\n\nThis project is provided under the terms of the [MIT License](LICENSE).\n\nOriginal version by **Cameron Little** · [Github](https://github.com/apexskier) · [Twitter](https://twitter.com/apexskier) · [CodePen](https://codepen.com/apexskier)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsluv%2Fhsluv-sass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhsluv%2Fhsluv-sass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsluv%2Fhsluv-sass/lists"}