ComfyUI > Nodes > ComfyUI Layer Style > LayerUtility: GetColorTone V2

ComfyUI Node: LayerUtility: GetColorTone V2

Class Name

LayerUtility: GetColorToneV2

Category
😺dzNodes/LayerUtility
Author
chflame163 (Account age: 445days)
Extension
ComfyUI Layer Style
Latest Updated
2024-06-24
Github Stars
0.64K

How to Install ComfyUI Layer Style

Install this extension via the ComfyUI Manager by searching for ComfyUI Layer Style
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Layer Style 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

LayerUtility: GetColorTone V2 Description

Powerful node for analyzing and extracting color tones from images, providing main and average colors in HEX and HSV formats.

LayerUtility: GetColorTone V2:

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.

LayerUtility: GetColorTone V2 Input Parameters:

image

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.

mode

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.

color_of

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.

remove_bkgd_method

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.

invert_mask

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.

mask_grow

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.

mask

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.

LayerUtility: GetColorTone V2 Output Parameters:

image

The image output is the processed image with the color tone applied. This can be useful for visual verification and further artistic manipulation.

color_in_hex

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.

HSV color in list

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.

LayerUtility: GetColorTone V2 Usage Tips:

  • Use the mode parameter to switch between extracting the main color and the average color of the image, depending on your artistic needs.
  • Experiment with the remove_bkgd_method and mask_grow parameters to refine the area of the image being analyzed, especially when dealing with complex backgrounds or subjects.
  • Utilize the invert_mask option to quickly switch the focus of your analysis between the subject and the background without needing to create a new mask.

LayerUtility: GetColorTone V2 Common Errors and Solutions:

"Invalid image format"

  • Explanation: The provided image is not in a supported format.
  • Solution: Ensure that the image is in a format accepted by the system, such as JPEG or PNG.

"Background removal method not recognized"

  • Explanation: The specified background removal method is not supported.
  • Solution: Check the remove_bkgd_method parameter and ensure it is set to either BiRefNet or RMBG 1.4.

"Mask size out of range"

  • Explanation: The value for mask_grow is outside the acceptable range.
  • Solution: Adjust the mask_grow parameter to be within the range of -999 to 999.

"Invalid mode selected"

  • Explanation: The selected mode for color analysis is not recognized.
  • Solution: Ensure the mode parameter is set to either main_color or average.

LayerUtility: GetColorTone V2 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Layer Style
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.