ComfyUI > Nodes > WAS Node Suite > Image Remove Color

ComfyUI Node: Image Remove Color

Class Name

Image Remove Color

Category
WAS Suite/Image/Process
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

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 Remove Color Description

Remove specific color from image, replace with chosen color for background removal, color correction, or artistic effects.

Image Remove Color:

The Image Remove Color node is designed to help you remove a specific color from an image, replacing it with another color of your choice. This can be particularly useful for tasks such as background removal, color correction, or artistic effects where you need to isolate or eliminate certain colors. The node works by calculating the difference between the input image and a solid color image, applying a threshold to determine which pixels should be replaced, and then compositing the result with the replacement color. This method ensures that the specified color is effectively removed while preserving the rest of the image's details.

Image Remove Color Input Parameters:

image

This parameter takes the input image from which you want to remove a specific color. The image should be in a format that the node can process, typically a PIL image.

threshold

The threshold parameter determines the sensitivity of the color removal process. It defines how close a pixel's color needs to be to the specified color for it to be considered for removal. A lower threshold means only colors very close to the specified color will be removed, while a higher threshold allows for more variation. The default value is 10, and it can typically range from 0 to 255.

color

This parameter specifies the color you want to remove from the image. It is defined as an RGB tuple, such as (255, 255, 255) for white. The node will target this color and remove it based on the threshold setting.

rep_color

The rep_color parameter defines the replacement color that will fill in the areas where the specified color has been removed. This is also an RGB tuple, such as (0, 0, 0) for black. This allows you to customize the appearance of the resulting image after the color removal.

Image Remove Color Output Parameters:

result_image

The result_image parameter is the output image with the specified color removed and replaced by the replacement color. This image retains the original details except for the areas where the color has been removed, providing a clean and customized result.

Image Remove Color Usage Tips:

  • Adjust the threshold parameter to fine-tune the color removal process. A lower threshold is useful for precise color removal, while a higher threshold can help when the target color has slight variations.
  • Use the color parameter to specify the exact color you want to remove. You can use a color picker tool to get the RGB values of the target color from the image.
  • Experiment with different rep_color values to achieve various artistic effects or to blend the modified areas seamlessly with the rest of the image.

Image Remove Color Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is not in a format that the node can process.
  • Solution: Ensure that the input image is a PIL image or convert it to a compatible format before using the node.

Threshold value out of range

  • Explanation: The threshold value provided is outside the acceptable range.
  • Solution: Set the threshold value between 0 and 255 to ensure proper functionality.

Color tuple invalid

  • Explanation: The color or rep_color parameter is not provided as a valid RGB tuple.
  • Solution: Ensure that both the color and rep_color parameters are specified as RGB tuples, such as (255, 255, 255) for white or (0, 0, 0) for black.

Image Remove Color 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.