Wikipedia has a list of colors that I am using for a basis of color names. I want to find the nearest named color given an arbitrary RGB value.
#5D8AA8 hex triplet is "Air Force Blue". This information will be stored in a database table
(tbl_Color (HexTriplet,ColorName)) in my system
Suppose I created a color with
#5D8AA7. I need to get the nearest color available in the tbl_Color table. The expected answer is "
#5D8AA8 - Air Force Blue". This is because
#5D8AA8 is the nearest color for
Do we have any algorithm for finding the nearest color? How to write it using C# or Java?