Visit ComfyUI Online for ready-to-use ComfyUI environment
Powerful node for analyzing and extracting color tones from images, providing main and average colors in HEX and HSV formats.
LayerUtility: GetColorToneV2 is a powerful node designed to analyze and extract color tones from images, providing both the main color and average color in different formats. This node is particularly useful for AI artists who need to understand the color composition of their images, whether for color grading, thematic consistency, or other artistic purposes. By leveraging advanced image processing techniques, this node can isolate and analyze specific parts of an image, such as the subject or background, and apply optional background removal methods to enhance accuracy. The node outputs the color information in both HEX and HSV formats, making it versatile for various applications.
The image parameter is the primary input for the node, where you provide the image you want to analyze. This parameter accepts an image in the format specified by the system.
The mode parameter determines the type of color analysis to perform. You can choose between main_color
to get the dominant color or average
to get the average color of the image. This choice affects the resulting color tone extracted from the image.
The color_of parameter specifies which part of the image to analyze. Options include entire
for the whole image, background
for just the background, and subject
for the main subject of the image. This allows for targeted color analysis based on your needs.
The remove_bkgd_method parameter offers methods for background removal to improve color analysis accuracy. Options include BiRefNet
and RMBG 1.4
, which are different algorithms for background removal. This is particularly useful when you want to isolate the subject or background for color analysis.
The invert_mask parameter is a boolean option that allows you to invert the mask used for background removal. The default value is False
. Inverting the mask can be useful in scenarios where you need to analyze the opposite part of the image than initially intended.
The mask_grow parameter allows you to expand or contract the mask used for background removal. It accepts integer values with a default of 16, and it can range from -999 to 999. Adjusting this parameter helps refine the area of the image being analyzed.
The mask parameter is optional and allows you to provide a custom mask for the image. This can be useful if you have a pre-defined area of the image that you want to analyze for color tones.
The image output is the processed image with the color tone applied. This can be useful for visual verification and further artistic manipulation.
The color_in_hex output provides the extracted color tone in HEX format. This is a string representation of the color, which is widely used in digital design and web development.
The HSV color in list output provides the extracted color tone in HSV format as a list. This format is useful for more detailed color manipulation and analysis, as it separates the color into hue, saturation, and value components.
mode
parameter to switch between extracting the main color and the average color of the image, depending on your artistic needs.remove_bkgd_method
and mask_grow
parameters to refine the area of the image being analyzed, especially when dealing with complex backgrounds or subjects.invert_mask
option to quickly switch the focus of your analysis between the subject and the background without needing to create a new mask.remove_bkgd_method
parameter and ensure it is set to either BiRefNet
or RMBG 1.4
.mask_grow
is outside the acceptable range.mask_grow
parameter to be within the range of -999 to 999.mode
parameter is set to either main_color
or average
.© Copyright 2024 RunComfy. All Rights Reserved.