ComfyUI > Nodes > comfy_Pond_Nodes > 🐳Mask_Color

ComfyUI Node: 🐳Mask_Color

Class Name

MaskColorReplace

Category
🐳Pond/mask
Author
Pondowner857 (Account age: 730days)
Extension
comfy_Pond_Nodes
Latest Updated
2026-01-28
Github Stars
0.04K

How to Install comfy_Pond_Nodes

Install this extension via the ComfyUI Manager by searching for comfy_Pond_Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfy_Pond_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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🐳Mask_Color Description

Transforms black mask areas into a custom color for artistic control and creative effects.

🐳Mask_Color:

The MaskColorReplace node is designed to transform the black areas of a mask into a custom color of your choice. This node is particularly useful for artists who want to apply specific color changes to masked areas in their images, allowing for creative control over the visual output. By replacing the black portions of a mask with a specified color, you can achieve a variety of artistic effects, such as highlighting certain areas or creating a unique color palette. This node simplifies the process of color replacement, making it accessible even to those without a technical background, and provides a straightforward method to enhance your artwork with custom color applications.

🐳Mask_Color Input Parameters:

mask

The mask parameter is a required input that specifies the mask image where the color replacement will occur. This mask should ideally highlight the areas you want to change, with black areas being the target for color replacement. The mask must be in the correct shape, and if it is a two-dimensional array, it will be adjusted to ensure compatibility with the node's processing requirements.

red

The red parameter allows you to set the intensity of the red component in the replacement color. It accepts integer values ranging from 0 to 255, with a default value of 0. Adjusting this parameter will affect the red hue in the final output, enabling you to fine-tune the color to your artistic preference.

green

The green parameter controls the intensity of the green component in the replacement color. Like the red parameter, it accepts integer values from 0 to 255, with a default value of 0. Modifying this parameter will influence the green hue in the resulting image, allowing for precise color customization.

blue

The blue parameter sets the intensity of the blue component in the replacement color. It also accepts integer values from 0 to 255, with a default value of 0. By adjusting this parameter, you can control the blue hue in the output, providing additional flexibility in achieving the desired color effect.

background_image

The background_image is an optional parameter that allows you to specify an image to be used as a background during the color replacement process. If provided, this image will be blended with the mask and the replacement color, creating a composite effect that can enhance the visual appeal of the final output.

threshold

The threshold parameter is an optional float value that determines the sensitivity of the color replacement process. It ranges from 0.0 to 1.0, with a default value of 0.01. This parameter helps define the cutoff point for what is considered "black" in the mask, allowing you to control the precision of the color replacement and avoid unintended areas being affected.

🐳Mask_Color Output Parameters:

image

The image output parameter provides the final image result after the color replacement process. This output is an image where the specified black areas of the mask have been replaced with the custom color defined by the red, green, and blue parameters. The output image reflects the artistic adjustments made through the node, offering a visually enhanced version of the original input.

🐳Mask_Color Usage Tips:

  • Experiment with different combinations of red, green, and blue values to achieve unique color effects that complement your artwork.
  • Use the threshold parameter to fine-tune the precision of the color replacement, especially when dealing with masks that have varying shades of black.
  • Consider using a background_image to add depth and complexity to your compositions, blending the replacement color with existing imagery.

🐳Mask_Color Common Errors and Solutions:

Mask shape mismatch

  • Explanation: This error occurs when the mask input does not have the correct shape or dimensions required by the node.
  • Solution: Ensure that the mask is a three-dimensional array. If it is two-dimensional, adjust it by adding an additional dimension to match the expected input format.

Invalid color value

  • Explanation: This error arises when the red, green, or blue parameters are set outside the acceptable range of 0 to 255. - Solution: Double-check the values for each color component and ensure they fall within the specified range to avoid processing errors.

Threshold out of range

  • Explanation: This error happens when the threshold parameter is set below 0.0 or above 1.0.
  • Solution: Adjust the threshold value to be within the valid range, ensuring it is between 0.0 and 1.0 for proper functionality.

🐳Mask_Color Related Nodes

Go back to the extension to check out more related nodes.
comfy_Pond_Nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.