node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

deuteranopia

deuteranopia

Simulate the prevalent deuteranopia form of colorblindness.

example

var deuteranopia = require('deuteranopia');
 
             // rgb 
deuteranopia(0, 200, 200);

api

  • deuteranopia(r, g, b)
  • deuteranopia([r, g, b])

Given a RGB triplet, return a RGB triplet that simulates the effect of deuteranopia.

Credits

Based heavily off of Color Oracle, which is in turn based off of Digital Video Colourmaps for Checking the Legibility of Displays by Dichromats