LayerStyle

2167
By chflame
Updated 15 days ago
View on GitHub →See Common Issues →

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.

Available Nodes

LayerStyle: GradientOverlay

LayerStyle: GradientOverlay Node Documentation

Overview

The LayerStyle: GradientOverlay node is a component of the ComfyUI framework, specifically designed to overlay a gradient onto an image layer. This node is useful for applying gradient effects to images for creative design work, enabling artists and developers to add colorful and aesthetically pleasing overlays on image layers.

Node Functionality

The GradientOverlay node applies a gradient overlay effect to a given image layer. It uses a specified color gradient, angle, and blend mode to creatively alter the appearance of the input image. The node allows users to control the opacity and blending of the overlay, providing flexibility in how the final image appears.

Inputs

The GradientOverlay node accepts the following inputs:

  • background_image (required): The base image over which the gradient overlay will be applied.

  • layer_image (required): The image layer that will have the gradient overlay applied.

  • invert_mask (required): A boolean option that determines whether the mask should be inverted. By default, it is set to true.

  • blend_mode (required): Specifies the blending mode for combining the gradient overlay with the layer image. This affects how the colors of the overlay and layer image mix.

  • opacity (required): An integer value representing the opacity level of the gradient overlay. It ranges from 0 (completely transparent) to 100 (completely opaque).

  • start_color (required): A string representing the starting color of the gradient in hexadecimal format.

  • start_alpha (required): An integer value indicating the alpha (transparency) level of the start color, ranging from 0 to 255.

  • end_color (required): A string representing the ending color of the gradient in hexadecimal format.

  • end_alpha (required): An integer value indicating the alpha (transparency) level of the end color, ranging from 0 to 255.

  • angle (required): An integer specifying the angle of the gradient in degrees, which dictates the direction of the gradient overlay. It can range from -180 to 180.

  • layer_mask (optional): An optional mask that dictates where the gradient overlay should be applied. This can modify the area of the image affected by the overlay.

Outputs

The GradientOverlay node produces the following output:

  • image: The resulting image after the gradient overlay has been applied to the layer image. It retains the same dimensions as the input images and reflects the specified gradient and blending parameters.

Usage in ComfyUI Workflows

In ComfyUI workflows, the GradientOverlay node is typically used in image processing pipelines where creative visual enhancements are required. It can be paired with other nodes to create advanced graphical effects, combining multiple image layers with varying gradients, colors, and opacity. It's useful in graphic design, digital art, video production, and any visual medium where dynamic color effects are needed.

Special Features and Considerations

  • Gradient Control: The node offers customization over both the colors and the transparency of the gradient via the start and end colors and alpha values, allowing for intricate color transitions and effects.

  • Blend Mode Flexibility: Multiple blending modes are available, enabling a range of visual styles when combining the gradient with the image layer.

  • Mask Usage: The optional layer mask feature can define specific areas of the image to be affected, allowing for precise applications of the gradient overlay.

  • User Interaction: It offers a straightforward interface for artists and developers to enhance or modify images without requiring deep technical knowledge of image processing.

In conclusion, the GradientOverlay node is a powerful tool for applying gradient effects to images, enhancing their visual appeal through customizable parameters. It's a versatile node suited for various applications in the ComfyUI framework.