Amresh S

Amresh S

  • NA
  • 437
  • 17.3k

How to convert integer color code to Argb color code?

Jun 16 2017 9:03 AM
Hi All,
 
I need to convert a integer color code to Argb color code in UWP. I had already achieved this in WPF by the below formaula:
 
  1. var blueValue = colorValue / 65536;  
  2. var greenValue = (colorValue - blueValue * 65536) / 256;  
  3. var redValue = colorValue - blueValue * 65536 - greenValue * 256;  
  4. return new SolidColorBrush(Color.FromRgb(Convert.ToByte(redValue), Convert.ToByte(greenValue), Convert.ToByte(blueValue)));  
Now, i need to convert the integer value to Argb color code.
 
Kindly share your ideas.
 
Thanks in advance.
 
Regards,
Amresh S. 

Answers (4)