Colorblind

A zero-dependencies color blindness simulation library. Transforms RGB colors to simulate color blindness.

What I've Learned

This was my first NPM library that was built simply to remove the onecolor dependency and add typings to the existing color-blind package. After some time digging into color-blind's code, I noticed the outdated algorithm used and after much research I went to implement a new algorithm based on the color blindness simulation research. I've documented further findings in the README.

The most significant part while building this library was setting up Rollup to bundle the TypeScript code into UMD, CommonJS and ES Module. The declaration typings generated with @rollup/plugin-typescript were tricky to get right at first, but I got it settled after reading through countless issues on GitHub.