ComfyUI > Nodes > antrobots ComfyUI Nodepack > Fill with Color

ComfyUI Node: Fill with Color

Class Name

fill_with_color

Category
antrobots-ComfyUI-nodepack/image-handling
Author
antrobot (Account age: 3193days)
Extension
antrobots ComfyUI Nodepack
Latest Updated
2025-04-02
Github Stars
0.02K

How to Install antrobots ComfyUI Nodepack

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

Fill with Color Description

Enhance image editing by filling areas with chosen color using mask for precise control and versatile adjustments.

Fill with Color:

The fill_with_color node is designed to enhance your image editing capabilities by allowing you to fill specific areas of an image with a chosen color. This is achieved by using a mask to determine which parts of the image should be affected. The node is particularly useful for tasks such as recoloring specific regions, creating artistic effects, or correcting image areas. By specifying the red, green, blue, and alpha (transparency) values, you can precisely control the color and opacity of the fill, making it a versatile tool for both subtle adjustments and bold transformations. This node simplifies the process of applying color fills, making it accessible even to those without a deep technical background.

Fill with Color Input Parameters:

image

The image parameter is the input image that you want to modify. It is provided as a tensor, which is a multi-dimensional array used to represent the image data. This parameter is crucial as it serves as the base on which the color fill will be applied.

mask

The mask parameter is a tensor that defines the areas of the image to be filled with the specified color. The mask acts as a stencil, where the non-zero values indicate the regions to be affected by the color fill. This allows for precise control over which parts of the image are altered.

R

The R parameter represents the red component of the color you wish to fill the image with. It is an integer value ranging from 0 to 255, with a default of 0. This parameter determines the intensity of the red color in the fill.

G

The G parameter stands for the green component of the fill color. Like the R parameter, it is an integer ranging from 0 to 255, with a default of 0. This value controls the green intensity in the color fill.

B

The B parameter is the blue component of the fill color. It is also an integer between 0 and 255, with a default of 0. This parameter sets the blue intensity in the color fill.

A

The A parameter represents the alpha, or transparency, of the fill color. It is an integer ranging from 0 to 255, with a default of 255, which means fully opaque. This parameter allows you to control the transparency of the color fill, enabling effects ranging from fully opaque to completely transparent.

Fill with Color Output Parameters:

image

The image output parameter is the resulting image tensor after the color fill has been applied. This output reflects the modifications made to the original image based on the specified mask and color parameters. It provides a visual representation of the changes, allowing you to see the effects of the color fill in the designated areas.

Fill with Color Usage Tips:

  • To achieve a smooth and natural-looking color fill, ensure that your mask accurately represents the areas you want to modify. A well-defined mask will result in a more precise application of the fill color.
  • Experiment with different alpha values to create varying levels of transparency in your color fills. This can be particularly useful for blending the fill with the original image or creating layered effects.

Fill with Color Common Errors and Solutions:

Mask and Image Size Mismatch

  • Explanation: The mask and image must be of the same size for the fill operation to work correctly. A mismatch in dimensions can cause errors.
  • Solution: Ensure that the mask is scaled to match the size of the image before applying the fill. You can use image processing tools to resize the mask accordingly.

Invalid Color Values

  • Explanation: The color components (R, G, B, A) must be integers within the range of 0 to 255. Values outside this range can cause unexpected behavior.
  • Solution: Double-check the color values to ensure they are within the valid range. Adjust any values that fall outside the 0-255 range.

Fill with Color Related Nodes

Go back to the extension to check out more related nodes.
antrobots ComfyUI Nodepack
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 Playground, enabling artists to harness the latest AI tools to create incredible art.