LayerColor: Levels Node Documentation
Overview
The LayerColor: Levels node is a part of the ComfyUI framework designed to adjust the tonal range and color balance of images. By manipulating the black point, white point, and gray point of an image or specific color channels, users can enhance image contrast and achieve desired visual effects. This node is particularly useful in scenarios where precise color correction and image enhancement are needed.
Key Features
- Channel Selection: Adjust levels for individual color channels (Red, Green, Blue) or for the entire image in RGB mode.
- Customized Level Adjustment: Fine-tune images by setting black point, white point, and gray point for input and output.
- Support for Transparency: Retains the alpha channel in images with transparent backgrounds (e.g., RGBA).
Inputs
The LayerColor: Levels node requires the following inputs:
-
Image: The image you want to process.
-
Channel: Specifies the color channel to be adjusted. Options include:
- RGB (entire image)
- Red
- Green
- Blue
-
Black Point: The lower limit for shadow detail in the image. Adjusting this value can suppress black tones.
- Type: Integer
- Default: 0
- Range: 0 to 255
-
White Point: The upper limit for the highlights or white tones. Lowering this value can bring out details in the whites.
- Type: Integer
- Default: 255
- Range: 0 to 255
-
Gray Point: Modifies the midtone levels, affecting image brightness.
- Type: Float
- Default: 1
- Range: 0.01 to 9.99
-
Output Black Point: Adjusts the darkest output level, enhancing the contrast.
- Type: Integer
- Default: 0
- Range: 0 to 255
-
Output White Point: Adjusts the lightest output level.
- Type: Integer
- Default: 255
- Range: 0 to 255
Outputs
The node produces the following output:
- Image: The processed image with adjusted levels.
Usage in ComfyUI Workflows
The LayerColor: Levels node is commonly used in image processing workflows where color grading, contrast enhancement, and precise color balancing are required. It can be employed in various scenarios, such as:
- Enhancing photographic images to make them appear more vivid and sharp.
- Preparing digital artwork by adjusting tones for desired mood lighting.
- Optimizing images for print or digital display by ensuring consistent color reproduction.
Workflow Example
- Input an image into the LayerColor: Levels node.
- Choose the desired channel to affect (e.g., enhance only the Blue channel for a cooler tone).
- Adjust the black, white, and gray points using the sliders to refine the contrast and brightness.
- Retrieve the processed image output and use it in subsequent workflow nodes for further image manipulation or export.
Special Considerations
- RGBA Images: When processing images with an alpha channel (transparency), the node preserves this channel, ensuring seamless integration of transparency effects in workflows.
- Performance: Depending on the resolution and number of images processed, adjustments might be computationally intensive. Ensure that your system can handle the processing requirements if batch operations are anticipated.
This node provides a robust toolset for image correction and enhancement, vital for projects demanding high-quality visuals and specific aesthetic results.