In any new code I develop I use the RGB function when defining control backcolor. But I have come across some old code which I am trying to tweak which just uses a Long value for colour definition.
The problem is it seems back to front and inconsistent.
In a table of "colour correspondence" a value of "A" has a colour value (long) of 255 - (which if I was starting from scratch I would use RGB(255,0,0).
If the control has a value of "A" this value (255) when assigned control.backcolor = 255 renders the control RED in some cases - but in others it appears as GREEN (RGB(0,255,0)
Both cases of the code use the same lookup to find "A" = 255 and make similar backcolor assignment. So I am very confused
Can anyome explain the return value of the RGB function because it isn't a simple conversion of FF0000 which would be 16711680 (if I put this value in my lookup table it makes BLUE