{"id":13598555,"url":"https://github.com/Canop/coolor","last_synced_at":"2025-04-10T09:31:35.124Z","repository":{"id":60775506,"uuid":"426731620","full_name":"Canop/coolor","owner":"Canop","description":"tiny color conversion library for TUI application builders","archived":false,"fork":false,"pushed_at":"2024-08-12T08:47:14.000Z","size":184,"stargazers_count":19,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-17T13:52:26.744Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Canop.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-10T18:22:55.000Z","updated_at":"2024-09-17T10:08:26.000Z","dependencies_parsed_at":"2024-11-06T23:38:29.921Z","dependency_job_id":"8c31759c-056e-488e-9234-93553b533ff3","html_url":"https://github.com/Canop/coolor","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"b7a51e49a120ae72e1f15bd52b80ebb2977f22b8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fcoolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fcoolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fcoolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fcoolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Canop","download_url":"https://codeload.github.com/Canop/coolor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191725,"owners_count":21062559,"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-08-01T17:00:53.619Z","updated_at":"2025-04-10T09:31:30.108Z","avatar_url":"https://github.com/Canop.png","language":"Rust","funding_links":[],"categories":["📦 Libraries"],"sub_categories":["🔧 Utilities"],"readme":"[![MIT][s2]][l2] [![Latest Version][s1]][l1] [![docs][s3]][l3] [![Chat on Miaou][s4]][l4]\n\n[s1]: https://img.shields.io/crates/v/coolor.svg\n[l1]: https://crates.io/crates/coolor\n\n[s2]: https://img.shields.io/badge/license-MIT-blue.svg\n[l2]: LICENSE\n\n[s3]: https://docs.rs/coolor/badge.svg\n[l3]: https://docs.rs/coolor/\n\n[s4]: https://miaou.dystroy.org/static/shields/room.svg\n[l4]: https://miaou.dystroy.org/3\n\nDefinition of ANSI, RGB and HSL color types and all the conversions between them.\n\nThere are many other color conversion crates.\nThis one is no-std and pure-rust and may be useful when you're interested into\n\n- variations of an ANSI color for your TUI application, for example fading, lightening, darkening, with compatibility with terminals that don't support RGB.\n- translations of color schemes\n- automatic downgrading of RGB color schemes for non RGB terminals\n- automated building of harmonious color schemes with guarantees of contrast\n- etc.\n\nCoolor is used in [SafeCloset](https://github.com/Canop/safecloset) to dynamically fade the background behind a dialog:\n\n![img](doc/faded-background.png)\n\nBe warned that the ANSI range is intrinsically limited to 240 colors and that not all intuitive operations will give good results.\n\nCoolor doesn't contain functions to print on the terminal, but the colors can be used in other crates.\nThere's an optional [feature](features.md) for conversion from and into [Crossterm](https://github.com/crossterm-rs/crossterm) colors. You'll see it used in the included examples.\n\n## Included Examples\n\n### ansi-variations\n\nLuminosity and saturation variations of all 240 ANSI colors, with all variants still ANSI colors.\n\n![ansi-variations](doc/ansi-variations.png)\n\n### ansi-mix\n\nSeveral ways to mix colors\n\n![ansi-mix](doc/ansi-mix.png)\n\n### rgb-to-ansi\n\nFinding the nearest ANSI color from a RGB one\n\n![rgb-to-ansi](doc/rgb-to-ansi.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCanop%2Fcoolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCanop%2Fcoolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCanop%2Fcoolor/lists"}