ComfyUI > Nodes > Akatz Custom Nodes > Normalize Image Color | Akatz

ComfyUI Node: Normalize Image Color | Akatz

Class Name

AK_NormalizeMaskImage

Category
💜Akatz Nodes/Image
Author
akatz-ai (Account age: 358days)
Extension
Akatz Custom Nodes
Latest Updated
2025-04-05
Github Stars
0.03K

How to Install Akatz Custom Nodes

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

Normalize Image Color | Akatz Description

Transform non-black pixels in images/videos to specified color, maintaining black areas as pure black for consistent color scheme.

Normalize Image Color | Akatz:

The AK_NormalizeMaskImage node is designed to transform the color of non-black pixels in an input image or video to a specified color. This node is particularly useful for artists and creators who want to apply a uniform color scheme to their visual content while maintaining the black areas as pure black. By setting a threshold, the node distinguishes between black and non-black pixels, allowing for precise color normalization across frames. This functionality is beneficial for creating consistent visual effects, enhancing the aesthetic appeal of images, and ensuring that specific color themes are adhered to in video sequences.

Normalize Image Color | Akatz Input Parameters:

image

The image parameter represents the input video tensor, which should have the shape (num_frames, H, W, C), where num_frames is the number of frames, H is the height, W is the width, and C is the number of color channels. This parameter is crucial as it provides the raw visual data that will be processed by the node to apply the specified color normalization.

threshold

The threshold parameter is a numerical value used to determine which pixels are considered black. Pixels with brightness below this threshold are treated as black and remain unchanged, while those above are altered to the specified color. This parameter is essential for controlling the sensitivity of the black pixel detection, allowing for fine-tuning of the color normalization process. The exact range of values is not specified, but it typically ranges from 0 to 255, corresponding to the intensity levels of a pixel.

r

The r parameter specifies the red channel value (0-255) for the non-black pixels. This value determines the intensity of the red color that will be applied to the non-black areas of the image. Adjusting this parameter allows you to control the red component of the target color, enabling customization of the visual output.

g

The g parameter specifies the green channel value (0-255) for the non-black pixels. Similar to the r parameter, this value sets the intensity of the green color for the non-black areas. By modifying this parameter, you can adjust the green component of the target color, providing further control over the color normalization.

b

The b parameter specifies the blue channel value (0-255) for the non-black pixels. This value determines the intensity of the blue color that will be applied to the non-black areas of the image. By changing this parameter, you can control the blue component of the target color, allowing for precise color customization.

Normalize Image Color | Akatz Output Parameters:

IMAGE

The IMAGE output parameter represents the processed video tensor, where non-black pixels have been set to the specified color while black pixels remain unchanged. This output is crucial for visualizing the effects of the color normalization process, providing a consistent and aesthetically pleasing result that adheres to the specified color scheme. The output maintains the original shape of the input, ensuring compatibility with subsequent processing steps or display requirements.

Normalize Image Color | Akatz Usage Tips:

  • To achieve a specific color theme across your video, carefully adjust the r, g, and b parameters to match your desired color. This will ensure that all non-black areas are uniformly colored, enhancing the visual consistency of your project.
  • Use the threshold parameter to fine-tune the sensitivity of black pixel detection. A lower threshold will result in more pixels being considered black, while a higher threshold will allow more pixels to be colored, providing flexibility in achieving the desired effect.

Normalize Image Color | Akatz Common Errors and Solutions:

"Input tensor shape mismatch"

  • Explanation: This error occurs when the input tensor does not have the expected shape (num_frames, H, W, C).
  • Solution: Ensure that your input image or video tensor is correctly formatted with the specified dimensions before passing it to the node.

"Invalid color value"

  • Explanation: This error arises when the r, g, or b parameters are set outside the valid range of 0-255.
  • Solution: Double-check the values assigned to the r, g, and b parameters, ensuring they are within the 0-255 range to represent valid color intensities.

Normalize Image Color | Akatz Related Nodes

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