### ARGB from Paint

This solution is similiar for B4A/B4i.
'Get the color given as Paint as an Int Array containing ARGB
'Example:
'Colorpicker1_ValueChanged (Value As Paint)
'Dim argb() As Int = GetARGB(Value)
'Log(argb(0) & "-" & argb(1) & "-" & argb(2) & "-" & argb(3))
'Result: 255-179-26-26
'Note: The colorpickervalue as Hex is 0xb31a1aff
`Sub GetARGB(ColorValue As Paint) As Int()
Dim Color As Int = fx.Colors.To32Bit(ColorValue)
Dim res(4) As Int
res(0) = Bit.UnsignedShiftRight(Bit.And(Color, 0xff000000), 24)
res(1) = Bit.UnsignedShiftRight(Bit.And(Color, 0xff0000), 16)
res(2) = Bit.UnsignedShiftRight(Bit.And(Color, 0xff00), 8)
res(3) = Bit.And(Color, 0xff)
Return res
End Sub`

Changed: , Category: Colors, File: T6C174M1255.htm, ID: 1255