Skip to content
ClassRendering & Filters@public

FlxColorMatrixFilter ​

Renderer-neutral 4×5 color-matrix effect descriptor.

ts
export declare class FlxColorMatrixFilter

Constructors ​

ts
constructor(matrix: readonly number[], alpha?: number)

Constructs a new instance of the FlxColorMatrixFilter class

ParameterTypeDescription
matrixreadonly number[]-
alphanumber-

Properties ​

PropertyModifiersTypeDescription
alphareadonlynumber-
kindreadonly``-
matrixreadonlyreadonly number[]-

Methods ​

static grayscale() ​

ts
static grayscale(alpha?: number): FlxColorMatrixFilter

Standard luminance-preserving grayscale transform.

Parameters:

ParameterTypeDescription
alphanumber-

Returns: FlxColorMatrixFilter

Released under the MIT License.