views:

22

answers:

1

I jave a Javascript code that draws a shape with specific color using "style.backgroundColor=". It works fine with one exception - for some reason Opera decides to set the color to similar, but not exactly the same one as the one that I want. For instance, if I set the color to #324252 Opera decides that it should be #314152! All other browsers draw exactly the color that I want.

Any idea why it is happening and what can be done about it ? For my particular application I have to set the color to the exact value that I need.

Thanks

+2  A: 

This is due to different browsers using different color spaces. When viewing on a mac for instance, the colors will also be different.

The only solution for this is probably using images, but there are some blog posts about this if you google 'browser color spaces'

Nicky De Maeyer