Class: ColorOverlayFilter

ColorOverlayFilter

Replace all colors within a source graphic with a single color.
originalfilter

new ColorOverlayFilter (color, alpha)

Name Type Attributes Default Description
color number | number<Array> <optional>
0x000000

The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]

alpha number <optional>
1

The alpha value of the color

See:

Example


  // replaces red with blue
  someSprite.filters = [new ColorOverlayFilter(
   [1, 0, 0],
   [0, 0, 1],
   0.001
   )];

Extends

  • PIXI.Filter

Members

alpha number

The alpha value of the color

Default Value:
  • 0

color number | number<Array> | Float32Array

The resulting color, as a 3 component RGB e.g. [1.0, 0.5, 1.0]

Default Value:
  • 0x000000