How can I get a color name using JS/JQuery, knowing the code RBG/HEX?
For example:
Colorname RGB
black #000000
white #FFFFFF
red #FF0000
green #008000
See Question&Answers more detail:osHow can I get a color name using JS/JQuery, knowing the code RBG/HEX?
For example:
Colorname RGB
black #000000
white #FFFFFF
red #FF0000
green #008000
See Question&Answers more detail:osYou can do that with color_classifier.js plugin. It works good and returns the name of nearest color that has name.
Just use like this
window.classifier = new ColorClassifier();
get_dataset('dataset.js', function (data){
window.classifier.learn(data);
});
var result_name = window.classifier.classify("#aaf000");