https://github.com/tmcw/deuteranopia
Simulate the prevalent deuteranopia form of colorblindness.
https://github.com/tmcw/deuteranopia
Last synced: 9 months ago
JSON representation
Simulate the prevalent deuteranopia form of colorblindness.
- Host: GitHub
- URL: https://github.com/tmcw/deuteranopia
- Owner: tmcw
- Created: 2013-08-19T02:10:44.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-12-30T17:33:27.000Z (over 7 years ago)
- Last Synced: 2025-02-06T14:11:50.596Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://macwright.org/deuteranopia/
- Size: 336 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## deuteranopia
[](https://circleci.com/gh/tmcw/deuteranopia)

Simulate the prevalent deuteranopia form of colorblindness.
## API
#### Table of Contents
- [deuteranopia](#deuteranopia)
- [Parameters](#parameters)
- [Examples](#examples)
### deuteranopia
Simulate deuteranopia, the common form of colorblindness.
Based heavily off of [Color Oracle](http://colororacle.org/), which is in
turn based off of [Digital Video Colourmaps for
Checking the Legibility of
Displays by Dichromats](http://vision.psychol.cam.ac.uk/jdmollon/papers/colourmaps.pdf)
#### Parameters
- `rgb` **\[r, g, b]** Input color
- `rgb.0` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** red
- `rgb.1` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** green
- `rgb.2` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** blue
#### Examples
```javascript
deuteranopia([0, 20, 0]);
```
Returns **\[r, g, b]** simulated color