N E W

premultiplyAlpha

Last modified: May 2, 2026

Premultiplies the RGB channels of a color by its alpha channel.

This function is useful for converting a non-premultiplied alpha color into a premultiplied alpha format, where the RGB values are scaled by the alpha value. Premultiplied alpha is often used in graphics rendering for certain operations, such as compositing and image processing.

ParameterTypeDefault Value
colorNode<vec4>

Returns

Node<vec4>
N E W

unpremultiplyAlpha

Unpremultiplies the RGB channels of a color by its alpha channel.

This function is useful for converting a premultiplied alpha color back into a non-premultiplied alpha format, where the RGB values are divided by the alpha value. Unpremultiplied alpha is often used in graphics rendering for certain operations, such as compositing and image processing.

ParameterTypeDefault Value
colorNode<vec4>

Returns

Node<vec4>