{"id":13397175,"url":"https://github.com/xi/sass-planifolia","last_synced_at":"2025-07-29T00:31:14.043Z","repository":{"id":5475596,"uuid":"53062737","full_name":"xi/sass-planifolia","owner":"xi","description":"Vanilla Sass helper functions","archived":false,"fork":false,"pushed_at":"2022-07-15T04:45:06.000Z","size":2120,"stargazers_count":40,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-09-28T04:13:21.755Z","etag":null,"topics":["a11y","color","contrast","math","sass"],"latest_commit_sha":null,"homepage":"https://xi.github.io/sass-planifolia/","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/xi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.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":"2016-03-03T15:46:37.000Z","updated_at":"2023-11-30T02:13:47.000Z","dependencies_parsed_at":"2022-08-08T05:15:09.478Z","dependency_job_id":null,"html_url":"https://github.com/xi/sass-planifolia","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fsass-planifolia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fsass-planifolia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fsass-planifolia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xi%2Fsass-planifolia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xi","download_url":"https://codeload.github.com/xi/sass-planifolia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227965100,"owners_count":17848364,"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":["a11y","color","contrast","math","sass"],"created_at":"2024-07-30T18:01:12.167Z","updated_at":"2024-12-03T17:29:37.709Z","avatar_url":"https://github.com/xi.png","language":"JavaScript","funding_links":[],"categories":["CSS","Libraries and Mixins"],"sub_categories":["Color"],"readme":"Sass-Planifolia - Vanilla Sass helper functions\n\nThis is a collection of vanilla Sass helper functions, mostly centered around\ncolors. It currently consists of only two modules:\n\n-   **contrast** for WCAG compatible [color\n    contrast](https://www.w3.org/TR/WCAG20/#contrast-ratiodef) functions\n-   **color** for color functions with supper for different color spaces, e.g.\n    CIELAB, CIELUV, or [HSLuv](http://www.hsluv.org/)\n\nThese modules can be imported individually. The only define mixins and\nvariables. They will not output any CSS. This means that importing them does\nnot add a single byte to your CSS.\n\nSee the [full documentation](https://xi.github.io/sass-planifolia/) for more\ndetails.\n\n# Quick start\n\n    npm install sass-planifolia\n\nImport it in your Sass files:\n\n```scss\n@use \"node_modules/sass-planifolia/sass/contrast\";\n@use \"node_modules/sass-planifolia/sass/color\";\n\n.test {\n    background-color: red;\n\n    // pick between two colors (default: black and white) to get good contrast\n    color: contrast.color(red);\n\n    // mix orange with black or white to get good contrast to red\n    border-color: contrast.stretch(red, orange);\n\n    // mix red with black in a perceptually uniform color space\n    box-shadow: 0 0 1em color.shade(red, 0.5, 'lab');\n}\n```\n\n# What is not included?\n\n-   Vendor prefixes, polyfills or browser hacks. There are plenty of librariers\n    for that.\n-   pt/px/em/rem conversion. That is (a) not possible and (b) not helpful. Each\n    unit has its specific use case. Learn to use the right units directly!\n\n# Similar libraries\n\n-   [CSS Color Moudle Level 4](https://www.w3.org/TR/css-color-4/) and [CSS\n    Color Module Level 5](https://www.w3.org/TR/css-color-5/) are W3C Working\n    Drafts (as of 2022-04-28) that would add similar features to CSS itself.\n-   [PostCSS](https://postcss.org/) and [Parcel](https://github.com/parcel-bundler/parcel-css) both\n    implement some of the functionality of CSS Color Module Level 4/5.\n-   [oddbird/blend](https://github.com/oddbird/blend) is yet another Sass\n    library that implements similar features. The main difference is that the\n    contrast function do not take transparency into account.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxi%2Fsass-planifolia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxi%2Fsass-planifolia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxi%2Fsass-planifolia/lists"}