Wednesday, 11 September 2013

How can I reconstruct this Color DCDFE3 using UIColor? To make it display the right color

How can I reconstruct this Color DCDFE3 using UIColor? To make it display
the right color

I currently using this snippet to parse the hex color ref.But I found out
that when parse "DCDFE3", the display color is both wrong in the simulator
and the machine. I figure that can be caused by the devide process, but I
have no idea how to solve this.
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue
& 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

No comments:

Post a Comment