Thank you all for answers
Don't look at the power of 10 representation
I answer Oliver on this observation but it is for everyone.
I need to look at the power of 10 representation because the app is connected to an ESP32 that sends HEX color code of some LEDs, in its power of 10 representation.
Long story short:
I'm using BLE on the ESP32, and for convenience it sends the power of 10 representation of the HEX color code (RGB,
not RGBA) through the BLE characteristic, in this way I do not have to parse strings to pass from 0xFF00FF to actual number usable in its code, and also on B4X.
Less conversions.
Also I need to perform some checks on B4X like:
'c is the color read from BLE (power of 10)'
If c = Colors.Transparent Then
c = 0x3CFFFFFF 'set this default gray color'
Else if c < 0xFF000000 Then 'if the Alpha channel is not present in the color
c = Bit.Or(c, 0xFF000000) 'i add it fully opaque -> 255'
End If
in this case the "Else If" does not work because, as I understood now, it is correct that 0xFF000000 is negative (I tought i would be represented as a UINT), so the checks fails even if the desired behaviour was the opposite.