Created with MathuraMG to provide accessible color names to the blind and visually impaired as part of the p5 accessible canvas project for the p5.js web editor. You can access the repo for the library here: https://github.com/lm-n/color-namer.
For use with Node.js: npm install colornamer
var color = require('colornamer'); color.rgbColorName(255,0,0); //returns red color.hexColorName('ff0000'); //returns red
Link your html to the library: https://rawgit.com/lm-n/color-namer/master/lib/colorNamer.js
Use the following functions to get a color name:
rgbColorName(255,0,0); //returns red the expected input is three ints hexColorName('ff0000'); //returns red the expected input is a string of six characters without "#"