Visit ComfyUI Online for ready-to-use ComfyUI environment
Create HSV color range for segmentation, filtering, and color isolation in image processing with flexible hue interval handling.
The BuildColorRangeHSV
node is designed to help you create a range of colors in the HSV (Hue, Saturation, Value) color space. This node is particularly useful for tasks that involve color segmentation, filtering, or any operation where you need to isolate specific colors within an image. By defining a range of HSV values, you can effectively target and manipulate specific colors, making it easier to perform operations like object detection, background removal, or color-based image enhancements. The node provides various methods to handle hue intervals, allowing you to choose the most appropriate approach for your specific needs, whether you want to ignore hue, use a single interval, or split the interval for more precise control.
color_a
is the first color in the HSV color space that defines one end of the color range. This parameter is crucial as it sets the lower or upper bound for the hue, saturation, and value that you want to include in your color range. The values for color_a
should be in the format (H, S, V), where H is the hue (0-179), S is the saturation (0-255), and V is the value (0-255).
color_b
is the second color in the HSV color space that defines the other end of the color range. Similar to color_a
, this parameter helps in setting the bounds for the hue, saturation, and value. The values for color_b
should also be in the format (H, S, V), where H is the hue (0-179), S is the saturation (0-255), and V is the value (0-255).
hue_mode
determines how the hue interval is handled. It can take several values such as "SMALLEST", "LARGEST", "IGNORE", "SINGLE", and "SPLIT". Each mode offers a different approach to handling the hue interval between color_a
and color_b
. For example, "SMALLEST" chooses the smallest interval, "LARGEST" chooses the largest interval, "IGNORE" disregards the hue entirely, "SINGLE" uses a single interval, and "SPLIT" splits the interval.
upper_bounds
is an HSV tuple that represents the upper limit of the color range. This output is essential for defining the maximum hue, saturation, and value that will be included in the color range. It helps in creating a mask or filter that isolates the desired colors in an image.
lower_bounds
is an HSV tuple that represents the lower limit of the color range. This output is crucial for defining the minimum hue, saturation, and value that will be included in the color range. It works in conjunction with upper_bounds
to create a comprehensive range for color segmentation or filtering.
hue_mode
is a string that indicates the method used to handle the hue interval. This output helps you understand which approach was taken to define the hue range, providing insight into how the color range was constructed.
color_a
or color_b
are out of the acceptable range.hue_mode
provided is not one of the supported modes ("SMALLEST", "LARGEST", "IGNORE", "SINGLE", "SPLIT").hue_mode
parameter is set to one of the supported values.color_a
and color_b
values do not form a valid range.color_a
and color_b
are correctly set to define a valid color range in the HSV space.© Copyright 2024 RunComfy. All Rights Reserved.