Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates conversion between various color spaces for accurate image display across devices, supporting ACES, sRGB, Rec.709, Display P3, Rec.2020, Adobe RGB, and more, with user-friendly mapping and handling of linear/non-linear spaces, gamma encoding/decoding, and color value clipping for HDR content.
The ColorspaceNode is designed to facilitate the conversion between different color spaces, which is crucial for ensuring that images are displayed correctly across various devices and platforms. This node supports a wide range of color spaces, including ACES, sRGB, Rec.709, Display P3, Rec.2020, and Adobe RGB, among others. By mapping user-friendly color space names to their technical equivalents, the node simplifies the process of color space conversion, making it accessible even to those without a deep technical background. The node handles both linear and non-linear color spaces, providing automatic gamma encoding and decoding where necessary. It also manages the clipping of color values to ensure that images are displayed within the appropriate range, particularly when dealing with high dynamic range (HDR) content. This functionality is essential for AI artists who need to maintain color accuracy and consistency in their digital artworks.
The from_colorspace
parameter specifies the color space of the input image. It determines how the node interprets the color data of the image before conversion. This parameter is crucial because it ensures that the image is correctly decoded if it is in an encoded color space. The available options include "ACES2065-1", "ACEScg", "ACEScct", "ACEScc", "sRGB", "sRGB Linear", "Rec.709", "Rec.709 Linear", "Display P3", "Display P3 Linear", "Rec.2020", "Rec.2020 Linear", "Adobe RGB", "Adobe RGB Linear", and "Raw". The choice of color space affects the initial processing of the image, particularly in terms of gamma correction and color value interpretation.
The to_colorspace
parameter defines the target color space to which the input image will be converted. This parameter is essential for ensuring that the output image is compatible with the intended display or processing environment. Similar to the from_colorspace
parameter, it offers a range of options, including "ACES2065-1", "ACEScg", "ACEScct", "ACEScc", "sRGB", "sRGB Linear", "Rec.709", "Rec.709 Linear", "Display P3", "Display P3 Linear", "Rec.2020", "Rec.2020 Linear", "Adobe RGB", "Adobe RGB Linear", and "Raw". The selection of the target color space influences the final appearance of the image, as it dictates the gamma encoding and any necessary clipping of color values.
The result_tensor
is the primary output of the ColorspaceNode, representing the image data after conversion to the specified target color space. This output is crucial for ensuring that the image is correctly displayed or processed in subsequent stages of a workflow. The result_tensor
is a torch tensor that contains the color-corrected image data, with values adjusted according to the gamma encoding and clipping rules of the target color space. This output ensures that the image maintains its intended appearance across different devices and platforms.
from_colorspace
and to_colorspace
parameters are correctly set to match the source and target environments of your image. This will prevent color inaccuracies and ensure consistent display across devices.from_colorspace
to bypass any conversion and maintain the original color data.<from_colorspace>
-> <to_colorspace>
from_colorspace
or to_colorspace
is not recognized or supported by the node.from_colorspace
and to_colorspace
parameters are set to valid options listed in the node's documentation. Ensure there are no typos or unsupported color space names.from_colorspace
or to_colorspace
is set to "Raw", meaning no conversion will be applied to the image.from_colorspace
or to_colorspace
to a specific color space other than "Raw". If no conversion is needed, this message can be safely ignored.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.