Skip to main content
Version: Phaser v3.90.0

ColorMatrixFXPipeline

The ColorMatrix FX Pipeline.

The color matrix effect is a visual technique that involves manipulating the colors of an image

or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,

allowing developers to create various stylistic appearances or mood settings within the game.

Common applications include simulating different lighting conditions, applying color filters,

or achieving a specific visual style.

A ColorMatrix effect is added to a Game Object via the FX component:


const sprite = this.add.sprite();



sprite.postFX.addColorMatrix();

Constructor

new ColorMatrixFXPipeline(game)

Parameters

nametypeoptionaldescription
gamePhaser.GameNoA reference to the Phaser Game instance.

Scope: static

Extends

Phaser.Renderer.WebGL.Pipelines.PostFXPipeline

Source: src/renderer/webgl/pipelines/fx/ColorMatrixFXPipeline.js#L10
Since: 3.60.0

Inherited Members

From Phaser.Renderer.WebGL.Pipelines.PostFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline:


Inherited Methods

From Phaser.Events.EventEmitter:

From Phaser.Renderer.WebGL.Pipelines.PostFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline: