{"id":26905142,"url":"https://github.com/jimdo/sass-contrast-color","last_synced_at":"2025-04-01T10:56:13.279Z","repository":{"id":58245462,"uuid":"42530784","full_name":"Jimdo/sass-contrast-color","owner":"Jimdo","description":"Mixin to get the color with higher contrast","archived":false,"fork":false,"pushed_at":"2015-10-16T11:19:04.000Z","size":136,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-11T16:18:58.580Z","etag":null,"topics":["owner-team-creator"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/Jimdo.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":"2015-09-15T16:12:04.000Z","updated_at":"2022-01-07T09:03:17.000Z","dependencies_parsed_at":"2022-08-31T04:50:43.636Z","dependency_job_id":null,"html_url":"https://github.com/Jimdo/sass-contrast-color","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fsass-contrast-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fsass-contrast-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fsass-contrast-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fsass-contrast-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jimdo","download_url":"https://codeload.github.com/Jimdo/sass-contrast-color/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246628272,"owners_count":20808106,"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":["owner-team-creator"],"created_at":"2025-04-01T10:56:12.744Z","updated_at":"2025-04-01T10:56:13.272Z","avatar_url":"https://github.com/Jimdo.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sass-contrast-color\n\u003e Function to get the color with higher contrast\n\n## Install\n\n1. Install the bower component to your project:\n```\n  bower install sass-contrast-color --save-dev\n```\n\n2. Import the Sass file into your code:\n```sass\n  @import \"bower_components/sass-contrast-color/contrast.sass\"\n```\nOr if you're using SCSS:\n```scss\n  @import \"bower_components/sass-contrast-color/contrast.scss\";\n```\nAdjust the tree to your project.\n\n## API\n\n```sass\n// Compare colors to higher contrast\ncontrast($base-color, $color1, $color2)\n\n// Compare colors to lower contrast (inverting the former contrast function)\ninvert-contrast($base-color, $color1, $color2)\n```\n### Parameter:\n\n* $base-color - set the basic color\n* $color1 - first color to compare with base-color\n* $color2 - second color to compare with base-color\n\n## Example\n\n```sass\n  body\n    background-color: red\n    color: contrast(red, black, white)\n```\n\nThe example will compare black and white with red and give back the more higher contrast color.\n\nSee the compiled CSS code:\n\n```css\n  body {\n    background-color: red;\n    color: white;\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimdo%2Fsass-contrast-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimdo%2Fsass-contrast-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimdo%2Fsass-contrast-color/lists"}