Options
All
  • Public
  • Public/Protected
  • All
Menu

This post processor can correct colors and simulate color blindness. It is possible to use this on every game, but the game's performance will suffer measurably. It's better to use it as a helpful tool while developing your game. Remember, the best practice is to design with color blindness in mind.

Color correction algorithm originally sourced from http://www.daltonize.org/

Example:

const game = new ex.Engine();

const colorBlindPostProcessor = new ex.ColorBlindCorrector(game, false, ColorBlindness.Protanope);

// post processors evaluate left to right
game.postProcessors.push(colorBlindPostProcessor);
game.start();

Hierarchy

  • ColorBlindCorrector

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

colorMode

colorMode: ColorBlindness

engine

engine: Engine

simulate

simulate: boolean

Methods

process

  • process(image: ImageData, out: CanvasRenderingContext2D): void