Python De-Linearize Colors I'm working on a custom exporter from blender to my iOS game engine, and all works fine and dandy, but I just noticed that all of the colors are messed up! I've looked at the Blender documentation and have searched google and found that the problem is that Blender works in a linearized color space.

How can I convert the colors to a format that other programs like? When I make a color in photoshop using the RGB values that blender gives me I get the skrewy colors, but when I copy the Hex code the color is right. I see that it says the Hex is Gamma Corrected. I'm using Mesh.materials[].diffuse_color, how can I correct this value?

Thanks for any help!
CoDEmanX's link had a way to fix this. It's more of a work around than a solution, but I can just change the display device in the "Scene" tab to None. This allows me to export the colors exactly as seen in Blender. It might mess up rendering a bit, but these are models for a game and in my case I don't need to render in Blender. One speed bump, though, is that any colors set before changing it will be messed up and will need to be corrected.