{"id":25112372,"url":"https://github.com/aurcode/sunglass-cli","last_synced_at":"2025-10-18T13:32:03.040Z","repository":{"id":273885163,"uuid":"920615017","full_name":"aurcode/sunglass-cli","owner":"aurcode","description":"Convert an image to a given color palette using Python. This script allows you to transform images by mapping their colors to a specified palette. The color distance is calculated using the CIEDE2000 algorithm.","archived":false,"fork":false,"pushed_at":"2025-01-24T14:16:17.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T10:39:38.552Z","etag":null,"topics":["ciede2000","image-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aurcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-22T13:22:36.000Z","updated_at":"2025-01-24T14:16:21.000Z","dependencies_parsed_at":"2025-01-23T15:27:59.350Z","dependency_job_id":"678421a4-c8ea-445e-b2c9-040e7f6160f1","html_url":"https://github.com/aurcode/sunglass-cli","commit_stats":null,"previous_names":["aurcode/sunglass-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aurcode/sunglass-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurcode%2Fsunglass-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurcode%2Fsunglass-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurcode%2Fsunglass-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurcode%2Fsunglass-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aurcode","download_url":"https://codeload.github.com/aurcode/sunglass-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurcode%2Fsunglass-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268457051,"owners_count":24253336,"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-08-02T02:00:12.353Z","response_time":74,"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":["ciede2000","image-processing"],"created_at":"2025-02-08T01:39:26.760Z","updated_at":"2025-10-18T13:31:57.941Z","avatar_url":"https://github.com/aurcode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sunglass-cli\n\n## Image Color Palette Converter\n\nThis Python script converts an input image to a specified color palette. The script utilizes the CIEDE2000 color difference algorithm to find the closest matching colors in the given palette.\n\n### Usage:\n1. Install the required Python libraries:\n   ```\n   docker run --rm -it --name python -v .:/src python:3.10 bash\n   pip install pillow==10.0.1 colormath==3.0.0 numpy==1.22.0\n   ```\n\n2. Run the script with the following command-line arguments:\n   ```\n   python image_color_converter.py input_image_path output_image_path --palette color1 color2 color3 ...\n   ```\n   - `input_image_path`: Path to the input image.\n   - `output_image_path`: Path to save the output image.\n   - `--palette`: List of hex colors to use in the output image (optional).\n\n### Example:\n```\npython /src/sunglass.py input.jpg output.jpg --palette ffffff 999999 555555 222222\npython /src/sunglass.py /src/res/input.jpg /src/res/output.jpg\n```\n\n### Results:\n\n![这是图片](./res/input.jpg \"girl lake input\")\n![这是图片](./res/output.jpg \"girl lake output\")\n\nFeel free to contribute, report issues, or suggest improvements!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurcode%2Fsunglass-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faurcode%2Fsunglass-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurcode%2Fsunglass-cli/lists"}