Skip to main content

Module matrices

Module matrices 

Source
Expand description

Common color transformation matrices.

These 4x5 matrices are used with the ColorMatrix filter primitive. Each row transforms a color channel: [R, G, B, A, offset].

Constantsยง

ALPHA_TO_BLACK
Extract alpha channel to RGB (for shadow effects).
GRAYSCALE
Grayscale conversion matrix using luminosity weights.
IDENTITY
Identity matrix (no change).
SEPIA
Sepia tone matrix for vintage photo effect.