ComfyUI  >  Nodes  >  WAS Node Suite >  Image Color Palette

ComfyUI Node: Image Color Palette

Class Name

Image Color Palette

Category
WAS Suite/Image/Analyze
Author
WASasquatch (Account age: 4688 days)
Extension
WAS Node Suite
Latest Updated
8/25/2024
Github Stars
1.1K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for  WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Image Color Palette Description

Extract and generate color palettes from images using various modes and clustering algorithms for AI artists.

Image Color Palette:

The Image Color Palette node is designed to extract and generate color palettes from images, providing a powerful tool for AI artists to analyze and utilize the color schemes present in their artwork. This node can create a palette based on various modes such as Linear, Brightness, Tonal, and BrightnessAndTonal, allowing for flexible and customized color extraction. By leveraging clustering algorithms like KMeans, it can identify dominant colors and present them in a visually appealing format. This node is particularly useful for creating consistent color themes, enhancing visual coherence, and inspiring new color combinations in your creative projects.

Image Color Palette Input Parameters:

image

This parameter takes the input image from which the color palette will be generated. The image should be in a format that can be processed by the node, typically a PIL image object. The quality and content of the image will directly impact the resulting color palette.

colors

This parameter specifies the number of colors to be included in the generated palette. It determines how many dominant colors will be extracted from the image. The default value is 16, but you can adjust this number based on your needs. Increasing the number of colors can provide a more detailed palette, while decreasing it can highlight the most prominent colors.

palette_mode

This parameter defines the method used to arrange the colors in the palette. Options include "Linear", "Brightness", "Tonal", and "BrightnessAndTonal". Each mode offers a different approach to sorting and displaying the colors, affecting the visual representation of the palette. The default mode is "Linear".

reverse_palette

This boolean parameter determines whether the generated palette should be reversed. When set to True, the order of the colors in the palette will be inverted. The default value is False.

Image Color Palette Output Parameters:

palette_image

This output parameter provides the generated color palette as an image. The palette image visually represents the extracted colors, arranged according to the selected palette mode. It can be used directly in your projects or as a reference for color selection.

palette_strings

This output parameter returns a list of color values in string format, typically in hexadecimal representation. These strings can be used for various purposes, such as defining color schemes in design software or web development.

Image Color Palette Usage Tips:

  • Experiment with different colors values to find the optimal number of colors for your palette. A higher number of colors can capture more details, while a lower number can emphasize the most dominant hues.
  • Use the palette_mode parameter to explore different ways of organizing your palette. For example, the "Brightness" mode can help you understand the lightness distribution of colors in your image.
  • If you want to create a contrasting palette, try setting reverse_palette to True to invert the order of the colors.

Image Color Palette Common Errors and Solutions:

Unsupported mapping mode: <mode>

  • Explanation: This error occurs when an invalid value is provided for the palette_mode parameter.
  • Solution: Ensure that the palette_mode parameter is set to one of the supported values: "Linear", "Brightness", "Tonal", or "BrightnessAndTonal".

Image not in RGB mode

  • Explanation: This error happens if the input image is not in RGB mode, which is required for color extraction.
  • Solution: Convert your image to RGB mode before passing it to the node. You can use the convert('RGB') method in PIL to achieve this.

Font not found at <path>

  • Explanation: This error indicates that the specified font file for generating the palette image is not found.
  • Solution: Ensure that the font file exists at the specified path or provide a valid path to an existing font file. If no custom font is needed, the node will use a default font.

Image Color Palette Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.