LayerUtility: GradientImage V2 Node Documentation
Overview
The LayerUtility: GradientImage V2 node is a component designed for the ComfyUI system, specifically under the 😺dzNodes/LayerUtility
category. This node is utilized to create gradient images, allowing for customization of size, direction (angle), and colors. It provides flexibility in generating gradient-based designs for various graphical applications.
Node Capabilities
Purpose
The primary function of the GradientImage V2 node is to generate a gradient image based on specified parameters, which include the size of the image, directional angle, and the starting and ending colors of the gradient.
Inputs
The node accepts several inputs to control the output gradient image:
-
Size:
- This defines the dimensions of the gradient image. It can be set to 'custom' or other predefined sizes from a custom size configuration.
-
Custom Width (INT):
- Specifies the width of the image if 'custom' size is selected.
- Default is 512, with a minimum of 4 and a maximum of 99999.
-
Custom Height (INT):
- Specifies the height of the image if 'custom' size is selected.
- Default is 512, with a minimum of 4 and a maximum of 99999.
-
Angle (INT):
- Determines the angle at which the gradient is applied.
- Default is 0 degrees, with a range from -360 to 360 degrees.
-
Start Color (STRING):
- Defines the starting color of the gradient in hex code format (e.g., "#FFFFFF" for white).
- Default is "#FFFFFF".
-
End Color (STRING):
- Defines the ending color of the gradient in hex code format (e.g., "#000000" for black).
- Default is "#000000".
-
Size As (Optional):
- Allows using the size of another image to determine the dimensions. This is useful for ensuring consistency in size across multiple gradient images.
Outputs
- Image (IMAGE):
- The node outputs the generated gradient image as an IMAGE type, which can be further used within the ComfyUI workflow for various purposes.
Usage in ComfyUI Workflows
The GradientImage V2 node can be incorporated into ComfyUI workflows wherever gradient images are required. Its flexible input settings make it suitable for creating backgrounds, overlays, or any graphic design element where a gradient is desired.
Examples of Usage
- Background Generation: Create gradient backgrounds for UI components or screens.
- Layer Effects: Use the gradient image as a layer to add depth and visual appeal.
- Color Transitions: Implementing smooth transitions between two chosen colors for aesthetic purposes.
Special Features and Considerations
- Customizable Dimensions: Users can define custom sizes for the gradient image, or derive sizes from existing images, providing adaptability and ease of integration.
- Variable Angle: The angle input grants control over the direction of the gradient, offering creative freedom to the user.
- Hex Color Support: Use of hexadecimal color codes allows precise control over the colors used in the gradient.
- Predefined Sizes: The node supports predefined sizes from a configuration file, enhancing usability by offering ready-to-use dimension settings.
This node plays a critical role in workflows demanding visual elements and design flexibility, contributing to the overall functionality of the ComfyUI system by enabling nuanced graphical configurations.