https://github.com/christian-byrne/img2colors-comfyui-node
Extract dominant or complementary color palettes from images. Convert colors to English names suitable for txt2img prompts.
https://github.com/christian-byrne/img2colors-comfyui-node
comfyui-nodes
Last synced: 4 months ago
JSON representation
Extract dominant or complementary color palettes from images. Convert colors to English names suitable for txt2img prompts.
- Host: GitHub
- URL: https://github.com/christian-byrne/img2colors-comfyui-node
- Owner: christian-byrne
- Created: 2024-05-25T03:13:59.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-05T17:48:17.000Z (6 months ago)
- Last Synced: 2025-01-05T18:29:16.757Z (6 months ago)
- Topics: comfyui-nodes
- Language: Python
- Homepage:
- Size: 1.68 MB
- Stars: 9
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-comfyui - **Img2color - Extract Colors from Image**
README
# Img2Color Palette Extractor ComfyUI Node

- Uses KMeans clustering to extract the dominant colors from an image
- Uses `webcolors` and `colornamer` to get closest matching color names from various color naming systems
- `get_complementary` toggler to get the complementary colors instead## Requirements
- colornamer==0.2.3
- scikit_learn>=1.4.0
- webcolors==1.13## Installation
- If you use a virtual environment to run ComfyUI, activate it
- `cd` to the `ComfyUI/custom_nodes` directory
- `git clone` this repository
- `cd` to the `img2colors-comfyui-node` directory
- `pip install -r requirements.txt`## Color Name Categories
- From webcolors: CSS3, CSS2, CSS2.1, and HTML4 webcolors
- From colornamer: XKCD, Design, Common, Color Families, Color or Neutral, Color Type
- [Explanation of colornamer categories](https://github.com/stitchfix/colornamer?tab=readme-ov-file#interpreting-results)