Hello, How can I add an Alpha parameter to the function below and receive the return value as ARGB?
B4X:
Public Sub HexToColor(Hex As String) As Int
Dim bc As ByteConverter
If Hex.StartsWith("#") Then
Hex = Hex.SubString(1)
Else If Hex.StartsWith("0x") Then
Hex = Hex.SubString(2)
End If
If Hex.Length = 6 Then
Hex = "FF" & Hex
End If
Dim ints() As Int = bc.IntsFromBytes(bc.HexToBytes(Hex))
Return ints(0)
End Sub