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

LayerUtility: GradientImage

Documentation for LayerUtility: GradientImage Node

Overview

The LayerUtility: GradientImage node in the ComfyUI LayerStyle extension is designed to generate a gradient image. This node allows users to create images that transition smoothly between two specified colors over a given angle, width, and height.

Inputs

The GradientImage node requires the following inputs:

  • Width

    • Type: Integer
    • Default Value: 512
    • Constraints: Minimum value of 4, maximum value of 99,999
    • Description: The width of the gradient image in pixels.
  • Height

    • Type: Integer
    • Default Value: 512
    • Constraints: Minimum value of 4, maximum value of 99,999
    • Description: The height of the gradient image in pixels.
  • Angle

    • Type: Integer
    • Default Value: 0
    • Constraints: Range from -360 to 360
    • Description: The angle of the gradient. This determines the direction in which the color transition occurs.
  • Start Color

    • Type: String (hexadecimal color code)
    • Default Value: #FFFFFF (white)
    • Description: The color at the start of the gradient. This should be specified in hexadecimal color code format.
  • End Color

    • Type: String (hexadecimal color code)
    • Default Value: #000000 (black)
    • Description: The color at the end of the gradient. Like the start color, this is specified in hexadecimal format.

Outputs

The node produces the following output:

  • Image
    • Type: Gradient Image
    • Description: The resulting gradient image defined by the specified width, height, angle, start color, and end color. The output is appropriate for use in further image processing within the ComfyUI environment.

Usage in ComfyUI Workflows

The GradientImage node is a versatile tool in ComfyUI workflows that allows users to create gradient backgrounds or layers to be used in graphic designs. It is particularly useful in visual projects that require smooth color transitions for aesthetic effects.

Typical use cases include:

  • Creating gradient backgrounds for graphic design projects.
  • Generating layers with color transitions to composite over other images.
  • Producing visual elements for use in digital artwork.

To use this node in a workflow, simply specify the desired parameters and connect the output to subsequent nodes that will utilize the generated gradient image.

Special Features and Considerations

  • Angle Customization: The node allows for full 360-degree directional customization of the gradient with the angle parameter, affording users significant flexibility in determining the direction of the color transition.

  • Color Input in Hexadecimal: Both the start and end colors are defined using hexadecimal color codes, a standard format in digital design, allowing for precise color selection.

  • Flexible Dimensions: With wide-ranging constraints on image dimensions, this node supports creating images for both small-scale and large-scale applications. Users should be mindful of the maximum limits to ensure appropriate resource usage.

Overall, the GradientImage node provides an essential capability within the ComfyUI ecosystem, offering users the ability to create dynamic visual elements with customizable gradients.