Get the name of a hex color in Java?
There should be a simple question, let's say I have something like this:
int pink = 0xff00ff;
How can I convert this integer to find out what color it is? So basically some sort of algorithm that will take a color and print its name. It doesn't matter if it's light or dark pink, I just need to say it's pink. Is it possible? I am using Java if that helps.
edit: Also, I don't mind if I need to use a library.
+3
source to share