06-26-2012 06:43 AM - edited 06-26-2012 06:46 AM
I am using following method for setting background color. I have R,B and B value for color which i want.But how can i convert it in 32-Bit 0x00RRGGBB format.
public static Background createLinearGradientBackground(int colorTopLeft, int colorTopRight, int colorBottomRight, int colorBottomLeft)
How can i covert it?
Solved! Go to Solution.
06-26-2012 07:57 AM
Your color values will be in the range 0 - 255. Convert these to hex and then use them. For example if your red value was 128, then that in hex is 80, if the Green was 16, then that would be 10 in hex and if the Blue was 64, this is 40, so the color value would be 0X00801040. make sense?