ComfyUI  >  Nodes  >  Bmad Nodes >  BuildColorRangeHSV (hsv)

ComfyUI Node: BuildColorRangeHSV (hsv)

Class Name

BuildColorRangeHSV (hsv)

Category
Bmad/CV/Color A.
Author
bmad4ever (Account age: 3591 days)
Extension
Bmad Nodes
Latest Updated
8/2/2024
Github Stars
0.1K

How to Install Bmad Nodes

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

BuildColorRangeHSV (hsv) Description

Create HSV color range for segmentation, filtering, and color isolation in image processing with flexible hue interval handling.

BuildColorRangeHSV (hsv):

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.

BuildColorRangeHSV (hsv) Input Parameters:

color_a

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

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

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.

BuildColorRangeHSV (hsv) Output Parameters:

upper_bounds

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

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

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.

BuildColorRangeHSV (hsv) Usage Tips:

  • Use the "IGNORE" hue mode when you want to focus solely on saturation and value, disregarding the hue component entirely.
  • Choose the "SMALLEST" hue mode for tasks that require the most precise color segmentation, as it selects the smallest interval between the two hues.
  • Utilize the "SPLIT" hue mode when the hue interval crosses the 0/179 boundary, ensuring that the color range is accurately represented.

BuildColorRangeHSV (hsv) Common Errors and Solutions:

Invalid HSV values

  • Explanation: The HSV values provided for color_a or color_b are out of the acceptable range.
  • Solution: Ensure that the hue (H) values are between 0 and 179, and the saturation (S) and value (V) values are between 0 and 255.

Unsupported hue_mode

  • Explanation: The hue_mode provided is not one of the supported modes ("SMALLEST", "LARGEST", "IGNORE", "SINGLE", "SPLIT").
  • Solution: Verify that the hue_mode parameter is set to one of the supported values.

Mismatched color bounds

  • Explanation: The color_a and color_b values do not form a valid range.
  • Solution: Ensure that color_a and color_b are correctly set to define a valid color range in the HSV space.

BuildColorRangeHSV (hsv) Related Nodes

Go back to the extension to check out more related nodes.
Bmad Nodes
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.