So I understand that there is a difference between the way web browsers show colors, but I am just wondering why there is a difference between how Java displays colors and web browsers do and if there is a way to correct for this in a java program.
My specific instance:
From this page:
http://xkcd.com/color/rgb/
I am using the color ‘periwinkle’. It is RGB value #8e82fe.
When building a java application (high level description, colored objects being shown for an experiment), the color is not the same it was on the web.
Is there a way to correct for this in the code?
Thanks,
Brian
Don’t use XKCD for your comparisons. Reading into the background behind that page ( see here and here ) that the experiment has nothing to do with what the actual color is, but what people think the name of the color is.
If your RGB colors are not matching out, then something is (probably) wrong in your code. Try adding an FF as the front (switching it to ARGB) and see if that resolves the problem.
Also, if you get IE, Firefox and Chrome ( I happen to have all of them at work ) and put the same web page in, and compare them, they should look the same ( they do to me, anyways… ).