{"id":15011028,"url":"https://github.com/less/less-plugin-advanced-color-functions","last_synced_at":"2026-03-02T20:35:00.666Z","repository":{"id":25320203,"uuid":"28747128","full_name":"less/less-plugin-advanced-color-functions","owner":"less","description":"Adds colour functions to less not provided by core","archived":false,"fork":false,"pushed_at":"2018-02-12T13:35:18.000Z","size":10,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-30T10:48:42.685Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/less.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-01-03T15:28:20.000Z","updated_at":"2023-09-17T12:44:00.000Z","dependencies_parsed_at":"2022-08-23T05:20:17.779Z","dependency_job_id":null,"html_url":"https://github.com/less/less-plugin-advanced-color-functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/less/less-plugin-advanced-color-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/less%2Fless-plugin-advanced-color-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/less%2Fless-plugin-advanced-color-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/less%2Fless-plugin-advanced-color-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/less%2Fless-plugin-advanced-color-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/less","download_url":"https://codeload.github.com/less/less-plugin-advanced-color-functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/less%2Fless-plugin-advanced-color-functions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268054933,"owners_count":24188309,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-24T19:38:32.227Z","updated_at":"2026-03-02T20:35:00.649Z","avatar_url":"https://github.com/less.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"less-plugin-advanced-color-functions\n====================================\n\nAdds some advanced colour functions that helps in finding more contrasting colors: \n\n - invertluma: inverts the luma of a color giving a version darken or lighter than the original\n - contrastmore: if color1 and color2 have a similar luma, it contrast color2 a little bit more. If the color2 luma resultant is greater than 1, or less than 0, its luma is pivoted around color1 luma.\n - autocontrast: if color1 and color2 have a similar luma, it contrast color2 a little bit more. \nIf the color2 luma resultant is greater than 1, or less than 0, its luma gets inverted.\n\n## lessc usage\n\n```\nnpm install -g less-plugin-advanced-color-functions\n```\n\nand then on the command line,\n\n```\nlessc file.less --advanced-color-functions\n```\n\n## Programmatic usage\n\n```\nvar LessPluginAdvancedColorFunctions = require('less-plugin-advanced-color-functions'),\n    AdvancedColorFunctions = new LessPluginAdvancedColorFunctions();\nless.render(lessString, { plugins: [AdvancedColorFunctions] })\n  .then(\n```\n\n## Browser usage\n\nBrowser usage is not supported at this time.\n\n## Example\n\n```css\n@color1: #ff0000;\n@color2: #ee0000;\n\n.colors {\ninvertluma: invertluma(@color1);\ncontrastmore: contrastmore(@color1,@color2);\nautocontrast: autocontrast(@color1,@color2);\nautocontrast50: autocontrast(@color1,@color2,50%);\n}\n```\n\noutputs:\n\n```css\n.colors {\n  invertluma: #ff0000;\n  contrastmore: #650000;\n  autocontrast: #ff7878;\n  autocontrast50: #ffdede;\n}\n```\n\nThe compiled coloures will look like that shown below:\n![contrasting colours used in buttons](http://imgur.com/CqwTiO9.png?1)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fless%2Fless-plugin-advanced-color-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fless%2Fless-plugin-advanced-color-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fless%2Fless-plugin-advanced-color-functions/lists"}