Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate smooth gradient images transitioning between specified colors for backgrounds and overlays with ease.
The GradientImage
node is designed to generate a smooth gradient image transitioning between two specified colors. This node is particularly useful for creating backgrounds, overlays, or any visual elements that require a gradient effect. By specifying the start and end colors, along with the dimensions of the image, you can create a wide range of gradient effects. The node ensures that the gradient is smoothly interpolated between the two colors, providing a visually appealing result. This functionality is essential for AI artists looking to add depth and dimension to their digital artwork without needing extensive technical knowledge.
The width
parameter defines the width of the gradient image in pixels. It determines how wide the resulting image will be. The minimum value for this parameter is 1, and the maximum value is not explicitly defined in the context, but it should be set according to your needs and system capabilities. The default value is 512 pixels. Adjusting the width allows you to create images that fit specific design requirements or canvas sizes.
The height
parameter specifies the height of the gradient image in pixels. Similar to the width, it controls the vertical dimension of the image. The minimum value is 1, and the maximum value is not explicitly defined, but it should be chosen based on your project requirements. The default value is 512 pixels. Modifying the height helps in creating images that match the desired aspect ratio or fit within a particular space in your design.
The start_color_hex
parameter sets the starting color of the gradient in hexadecimal format. This color will appear at the top of the gradient image. The hex code should be a string of 7 characters (e.g., #FF0000
for red) or 9 characters if including alpha transparency (e.g., #FF0000FF
). This parameter allows you to define the initial color of the gradient, which is crucial for achieving the desired visual effect.
The end_color_hex
parameter defines the ending color of the gradient in hexadecimal format. This color will appear at the bottom of the gradient image. Similar to the start color, the hex code should be a string of 7 characters (e.g., #0000FF
for blue) or 9 characters if including alpha transparency (e.g., #0000FFFF
). This parameter is essential for setting the final color of the gradient, ensuring a smooth transition from the start color.
The image
output parameter provides the generated gradient image in RGB format. This image can be used directly in your projects as a background, overlay, or any other visual element. The smooth transition between the start and end colors creates a visually appealing effect that enhances the overall aesthetic of your artwork.
The mask
output parameter is a black and white image derived from the alpha channel of the gradient image. This mask can be used for various purposes, such as masking out parts of other images or creating complex compositions. The mask ensures that the gradient's transparency is accurately represented, allowing for more advanced image manipulation techniques.
#FF0000
) or 9 characters if including alpha transparency (e.g., #FF0000FF
).© Copyright 2024 RunComfy. All Rights Reserved.