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: RGB Value

LayerUtility: RGB Value Node Documentation

Overview

The LayerUtility: RGB Value node is part of the ComfyUI LayerStyle collection. This node is designed to convert a color value into its constituent Red, Green, and Blue (RGB) components. It acts as a utility node within a workflow to extract and manipulate color data, particularly useful when working with layers and styling elements in ComfyUI.

Functionality

This node takes a color value as input and processes it to produce discrete RGB components. The conversion supports both hexadecimal color strings and RGB tuples, offering flexibility depending on the format of the color data in your workflow.

Inputs

  • Color Value: This input accepts a color value which can be provided in two formats:
    • Hexadecimal String: A string representation of a color, typically in formats like #RRGGBB.
    • RGB Tuple: A tuple representation of a color, such as (R, G, B), with integer values for red, green, and blue components.

Outputs

The node produces three outputs representing the individual RGB components of the color input:

  • R: The red component of the color, an integer between 0 and 255.
  • G: The green component of the color, an integer between 0 and 255.
  • B: The blue component of the color, an integer between 0 and 255.

These outputs allow for further processing and manipulation within ComfyUI workflows, making it easier to apply specific styling and layer effects based on color data.

Workflow Usage

In ComfyUI workflows, the LayerUtility: RGB Value node can be employed in several scenarios, including:

  • Color-Based Styling: Extract RGB components from color inputs to apply specific styling actions that depend on individual color intensities.
  • Data Conversion: Convert color inputs from different formats to RGB tuples to ensure consistency across the workflow.
  • Conditional Logic: Use the extracted RGB values in conditional nodes to drive logic based on color presence or intensity levels.

Special Features and Considerations

  • Input Flexibility: The node supports both hexadecimal strings and RGB tuples, making it adaptable to various data sources and workflow requirements.
  • Error Logging: If an invalid input type is provided, the node logs an error message, indicating the required input types, ensuring clarity and aiding in debugging.

In summary, the LayerUtility: RGB Value node is a powerful tool within the ComfyUI ecosystem, providing essential functionality for extracting and utilizing RGB color data effectively in creative and dynamic UI workflows.