ComfyUI  >  Nodes  >  Masquerade Nodes >  Mix Color By Mask

ComfyUI Node: Mix Color By Mask

Class Name

Mix Color By Mask

Category
Masquerade Nodes
Author
BadCafeCode (Account age: 485 days)
Extension
Masquerade Nodes
Latest Updated
6/19/2024
Github Stars
0.3K

How to Install Masquerade Nodes

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

Mix Color By Mask Description

Blend color into image based on mask for selective color overlay, precise adjustments without affecting entire image.

Mix Color By Mask:

The Mix Color By Mask node allows you to blend a specified color into an image based on a mask. This node is particularly useful for selectively altering parts of an image by applying a color overlay where the mask is active. The primary benefit of this node is its ability to seamlessly integrate a new color into specific regions of an image, providing a powerful tool for creative image manipulation and enhancement. By using a mask, you can control precisely where the color is applied, enabling detailed and targeted adjustments without affecting the entire image.

Mix Color By Mask Input Parameters:

image

This parameter represents the input image that you want to modify. The image should be in a format that the node can process, typically a tensor representation of the image.

r

This parameter specifies the red component of the color you want to blend into the image. It accepts integer values ranging from 0 to 255, with a default value of 0. Adjusting this value will change the intensity of the red color in the blend.

g

This parameter specifies the green component of the color you want to blend into the image. It accepts integer values ranging from 0 to 255, with a default value of 0. Adjusting this value will change the intensity of the green color in the blend.

b

This parameter specifies the blue component of the color you want to blend into the image. It accepts integer values ranging from 0 to 255, with a default value of 0. Adjusting this value will change the intensity of the blue color in the blend.

mask

This parameter represents the mask image that determines where the color blend will be applied. The mask should be in a format that the node can process, typically a tensor representation of the mask. Areas of the mask with higher values will receive more of the blended color, while areas with lower values will receive less.

Mix Color By Mask Output Parameters:

image

The output is the modified image with the specified color blended into the regions defined by the mask. This image retains the original dimensions and format of the input image but with the color adjustments applied as per the mask.

Mix Color By Mask Usage Tips:

  • To achieve a subtle color blend, use a mask with gradient values rather than a binary mask. This will create a smoother transition between the original image and the blended color.
  • Experiment with different values for the r, g, and b parameters to find the perfect color blend for your image. Small adjustments can significantly impact the final result.
  • Use this node in combination with other nodes, such as Image To Mask, to create complex and detailed image manipulations.

Mix Color By Mask Common Errors and Solutions:

Error: "Input image and mask must have the same dimensions."

  • Explanation: This error occurs when the dimensions of the input image and the mask do not match.
  • Solution: Ensure that the input image and the mask have the same width and height. You may need to resize one of them to match the other.

Error: "Invalid color component value."

  • Explanation: This error occurs when the values for r, g, or b are outside the acceptable range of 0 to 255. - Solution: Check the values for the r, g, and b parameters and ensure they are within the range of 0 to 255.

Error: "Unsupported image format."

  • Explanation: This error occurs when the input image or mask is in a format that the node cannot process.
  • Solution: Convert the input image and mask to a supported format, typically a tensor representation, before using the node.

Mix Color By Mask Related Nodes

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