{"id":13637209,"url":"https://github.com/marekm4/dominant_color","last_synced_at":"2025-12-12T14:09:15.206Z","repository":{"id":57621407,"uuid":"194320783","full_name":"marekm4/dominant_color","owner":"marekm4","description":"Simple image color extractor written in Rust with no external dependencies","archived":false,"fork":false,"pushed_at":"2023-03-06T11:03:03.000Z","size":136,"stargazers_count":34,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-06T17:07:46.037Z","etag":null,"topics":["color","color-extratcion","palette-generation","rust"],"latest_commit_sha":null,"homepage":"","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/marekm4.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":"2019-06-28T18:55:41.000Z","updated_at":"2024-09-29T02:53:28.000Z","dependencies_parsed_at":"2024-08-02T00:20:34.319Z","dependency_job_id":null,"html_url":"https://github.com/marekm4/dominant_color","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":0.06976744186046513,"last_synced_commit":"36b7c3bf1a67ea82c2d3800aac44c4fcc630fdd6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekm4%2Fdominant_color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekm4%2Fdominant_color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekm4%2Fdominant_color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekm4%2Fdominant_color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marekm4","download_url":"https://codeload.github.com/marekm4/dominant_color/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223795266,"owners_count":17204137,"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":["color","color-extratcion","palette-generation","rust"],"created_at":"2024-08-02T00:01:12.898Z","updated_at":"2025-12-12T14:09:15.140Z","avatar_url":"https://github.com/marekm4.png","language":"Rust","funding_links":[],"categories":["Libraries","Machine Learning"],"sub_categories":["Image processing"],"readme":"# dominant_color\nSimple image color extractor written in Rust with no external dependencies\n\n## Install\n```\ncargo add dominant_color\n```\n\n## Usage\n```rust\nuse std::path;\nuse image::EncodableLayout;\n\nfn main() {\n    let image = image::open(path::Path::new(\"docs/Fotolia_45549559_320_480.jpg\")).unwrap();\n\n    // if you are sure that you are using RGB image\n    let colors = dominant_color::get_colors(image.as_bytes(), false);\n    println!(\"{:?}\", colors);\n\n    // if you are not sure\n    let colors = dominant_color::get_colors(image.to_rgb8().as_bytes(), false);\n    println!(\"{:?}\", colors);\n\n    // if image has alpha channel\n    let colors = dominant_color::get_colors(image.to_rgba8().as_bytes(), true);\n    println!(\"{:?}\", colors);\n}\n```\n\n## Example\n![Image](https://raw.githubusercontent.com/marekm4/dominant_color/master/docs/Fotolia_45549559_320_480.jpg)\n\n![Colors](https://raw.githubusercontent.com/marekm4/dominant_color/master/docs/colors.png)\n\n## Demo\nhttps://dominant-color-demo.marekm4.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekm4%2Fdominant_color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarekm4%2Fdominant_color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekm4%2Fdominant_color/lists"}