{"id":25730343,"url":"https://github.com/qtiptip/pylette","last_synced_at":"2025-05-16T18:10:18.737Z","repository":{"id":32888482,"uuid":"145131524","full_name":"qTipTip/Pylette","owner":"qTipTip","description":"A Python library for extracting color palettes from supplied images.","archived":false,"fork":false,"pushed_at":"2025-04-07T10:30:05.000Z","size":2588,"stargazers_count":135,"open_issues_count":4,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T17:49:13.147Z","etag":null,"topics":["color","color-palette","color-scheme","colorpicker","command-line-interface","image-analysis","image-processing","pillow","python","visualization-tools"],"latest_commit_sha":null,"homepage":"https://qtiptip.github.io/Pylette/","language":"Python","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/qTipTip.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-17T14:37:49.000Z","updated_at":"2025-04-05T07:40:10.000Z","dependencies_parsed_at":"2024-02-14T15:24:59.463Z","dependency_job_id":"55d2f7e4-68a6-4f69-998f-63954f14428c","html_url":"https://github.com/qTipTip/Pylette","commit_stats":{"total_commits":65,"total_committers":2,"mean_commits":32.5,"dds":0.1384615384615384,"last_synced_commit":"d464ca712863a20c486004a3ecbd87441dbb8f4d"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qTipTip%2FPylette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qTipTip%2FPylette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qTipTip%2FPylette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qTipTip%2FPylette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qTipTip","download_url":"https://codeload.github.com/qTipTip/Pylette/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582907,"owners_count":22095518,"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-palette","color-scheme","colorpicker","command-line-interface","image-analysis","image-processing","pillow","python","visualization-tools"],"created_at":"2025-02-26T01:47:27.230Z","updated_at":"2025-05-16T18:10:18.700Z","avatar_url":"https://github.com/qTipTip.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://qtiptip.github.io/Pylette/\"\u003e\u003cimg src=\"docs/example_imgs/pylette_logo.jpg\" alt=\"Pylette\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eWelcome to Pylette, the easy-to-use Python library for extracting color palettes from images!\n\u003c/em\u003e\n\u003c/p\u003e\n\n\n[![PyPI version](https://badge.fury.io/py/Pylette.svg)](https://badge.fury.io/py/Pylette)\n[![Downloads](http://pepy.tech/badge/pylette)](http://pepy.tech/project/pylette)\n[![Built with Material for MkDocs](https://img.shields.io/badge/Material_for_MkDocs-526CFE?logo=MaterialForMkDocs\u0026logoColor=white)](https://squidfunk.github.io/mkdocs-material/)\n![Dependabot](https://img.shields.io/badge/dependabot-enabled-025E8C?logo=dependabot\u0026logoColor=white)\n[![DOI](https://zenodo.org/badge/145131524.svg)](https://doi.org/10.5281/zenodo.14757252)\n\n---\n\n**Documentation**: [qtiptip.github.io/Pylette](https://qtiptip.github.io/Pylette/)\n\n**Source code:** [qTipTip/Pylette](https://github.com/qTipTip/Pylette)\n\n---\n\n## What is Pylette?\n\nPylette is a powerful yet user-friendly library designed to help you extract color palettes from images. Whether you're\nworking on computer graphics, visualizations, or generative art, Pylette makes it easy to create visually appealing\ncolor sets.\n\nKey features:\n\n* Extract color palettes from images\n* Support for various color modes (RGB, RGBa, HSV, etc.)\n* Random color selection from palettes\n* Command-line interface for quick palette extraction\n\n## Getting Started\n\n### Installation\n\nYou can easily install Pylette using pip:\n\n```shell\npip install Pylette\n```\n\nOr if you prefer using Poetry:\n\n```shell\npoetry add Pylette\n```\n\n### Quick Start Guide\n\nHere's how to extract a color palette from an image and work with it in Python:\n\n```python\nfrom Pylette import extract_colors\n\npalette = extract_colors(image='image.jpg', palette_size=10)\n# Access colors by index\nmost_common_color = palette[0]\nleast_common_color = palette[-1]\n\n# Get color information\nprint(most_common_color.rgb)\nprint(most_common_color.hls)\nprint(most_common_color.hsv)\n\n# Display the palette, and save the image to file\npalette.display(save_to_file=True)\n\n# Save palette's color values to CSV\npalette.to_csv(filename='color_palette.csv', frequency=True)\n\n# Pick random colors\nrandom_color = palette.random_color(N=1, mode='uniform')\nrandom_colors = palette.random_color(N=100, mode='frequency')\n```\n\nThis will give you a palette of 10 colors, sorted by frequency.\nThe image is automatically resized to 256x256 pixels for faster processing.\nSee the [documentation](https://qtiptip.github.io/Pylette) for a complete list of available methods and attributes.\n\n## Command Line Interface:\n\nPylette also comes with a command-line interface for quick palette extraction:\n\n```shell\n pylette --help\n\n Usage: pylette [OPTIONS]\n\n╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --filename                                     PATH                   [default: None]                                                                                                                                                  │\n│ --image-url                                    TEXT                   [default: None]                                                                                                                                                  │\n│ --mode                                         [KM|MC]                [default: KM]                                                                                                                                                    │\n│ --n                                            INTEGER                [default: 5]                                                                                                                                                     │\n│ --sort-by                                      [frequency|luminance]  [default: luminance]                                                                                                                                             │\n│ --stdout                --no-stdout                                   [default: stdout]                                                                                                                                                │\n│ --out-filename                                 PATH                   [default: None]                                                                                                                                                  │\n│ --display-colors        --no-display-colors                           [default: no-display-colors]                                                                                                                                     │\n│ --colorspace                                   [rgb|hsv|hls]          [default: rgb]                                                                                                                                                   │\n│ --install-completion                                                  Install completion for the current shell.                                                                                                                        │\n│ --show-completion                                                     Show completion for the current shell, to copy it or customize the installation.                                                                                 │\n│ --help                                                                Show this message and exit.                                                                                                                                      │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqtiptip%2Fpylette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqtiptip%2Fpylette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqtiptip%2Fpylette/lists"}