I'm, glad to announce that I've just release NTC (Name That Color), a command line utility that accepts color definitions (hex or RGB) as input, and returns the color's name:
Code: Select all
$ ntc #ff4020
Pomegranate
$ ntc 120,80,200
Fuchsia Blue
https://github.com/tajmone/name-that-color
The project was inspired by the existing NTC JS project — which exists also as a cool online tool.
Basically, ntc contains a table of 1566 color name/value pairs, and when you look up a color it will compare the color difference of target color and each color in the list, returning either the first exact match, or the name of the color less distant from it.
I've implemented the dE00 (CIE Delta E 2000) algorithm for color comparison. So, for those interested in working with colors, there you have it: a full implementation of dE00 algorithm in PureBASIC!
Possibily, in the future I'll add also a GUI version, and tools to manage the color names lists. But first I'll have to handle the passage to the Unicode-only coming version of PB5.50 — as posted at the link below, I've faced some problems with Unicode mode for this app, in Windows CMD (with batch scripts redirected to files), so I've ultimately decided to compile it in Ascii mode:
http://www.purebasic.fr/english/viewtop ... 8&start=60
Any contributions, feedback and forks are most welcome!
Especially from users testing it on Linux and Mac.