ComfyUI Node
Img2Color - Color Palette Extractor
A ComfyUI node in img2txt with 6 inputs and 8 outputs.
Img2Color - Color Palette Extractor
- input_image
- plain_english_colors
- rgb_colors
- hex_colors
- xkcd_colors
- design_colors
- common_colors
- color_types
- color_families
◄num_colors5►
◄get_complementaryfalse►
◄k_means_algorithmlloyd►
◄accuracy60►
◄exclude_colors►
Categoryimg2txt
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_image | IMAGE | — | |
| num_colorsopt | INT | 51–128 | Number of colors to detect |
| get_complementaryopt | BOOLEAN | false | Get the complementary colors of the detected palette |
| k_means_algorithmopt | COMBO | lloyd | 4 options: lloyd, elkan, auto, full |
| accuracyopt | INT | 601–100 | Adjusts accuracy by changing number of iterations of the K-means algorithm |
| exclude_colorsopt | STRING | Comma-separated list of colors to exclude from the output |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| plain_english_colors | STRING | Plain English Colors correspond to the closest named color in the CSS3, CSS2, CSS21, and HTML4 color dictionaries. |
| rgb_colors | STRING | RGB Colors are in the format "rgb(255, 0, 255)" |
| hex_colors | STRING | Hex Colors are in the format #RRGGBB |
| xkcd_colors | STRING | XKCD Color is the finest level of granularity, and corresponds to the colors in the XKCD color survey. There are about 950 colors in this space. |
| design_colors | STRING | Design Color is the next coarsest level. There are about 250 Design Colors |
| common_colors | STRING | Common Color is the next coarsest level. There are about 120 Common Colors. This is probably the most useful level for most purposes. |
| color_types | STRING | Color Type is another dimension that tells, roughly, how light, dark or saturated a color is. There are 11 color types. |
| color_families | STRING | Color Family is even coarser, and has 26 families. These are all primary, secondary, or tertiary colors, or corresponding values for neutrals. |