phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

Home Page:http://phaser.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adaptability enhancement: daltonization filter for people with colorblindness

jgordon510 opened this issue · comments

I work for a puzzle company which uses Phaser CE in our games. We wanted a way to implement daltonization, which is an algorithm to compensate for the three major types of colorblindness.

You can read more about it here: http://www.daltonize.org/2010/05/lms-daltonization-algorithm.html

I created a phaser filter class and adapted the algorithm to work with a shader. I have a running example here with code: https://replit.com/@jgordon510/daltonizer-prototype#script.js

I'd be happy to do a pull request if you're interested in implementing some version of it into the codebase. I know these things are usually done as plugins, but since it's an accessibility enhancement, I thought you might be interested in incorporating it into the project itself.

commented

You're welcome to add it to filters.