Thanks Raven_Singularity
if it is so, the only way to set colors as costants is to use the work of Steve. It seems that I remember a COLOR.BI file.
CONST Yellow = _RGBA32(255, 255, 0, 255)so I can have in my code a CONST colorXXX
That saves the 32bit colour value.
The value returned is either the closest color attribute number or a 32-bit _UNSIGNED LONG color value..
CONST sed~& = _RGBA32(155, 12, 127, 255)
sed2~& = _RGB(155, 12, 127)
PRINT sed~&
PRINT sed2~&
SLEEP
SCREEN 13
sed2~& = _RGB(155, 12, 127)
PRINT sed~&
PRINT sed2~&
SLEEP
FOR f = 0 TO 255
_PALETTECOLOR f, RND * 255
NEXT
sed2~& = _RGB(155, 12, 127)
PRINT sed~&
PRINT sed2~&
SLEEP
SCREEN _NEWIMAGE(1024, 768, 32)
sed2~& = _RGB(155, 12, 127)
PRINT sed~&
PRINT sed2~&
I've done some experiments in this direction and my conclusion is that _RGB returns a value depending on the color palette used in the 256 color screen. This is not necessary for a 32-bit screen and therefore _RGB returns the same value as _RGB32 in a 32-bit screen.
SCREEN 0
r1 = _RGB(255, 0, 0)
SCREEN 13
r2 = _RGB(255, 0, 0)
SCREEN _NEWIMAGE(600, 400, 32)
r3 = _RGB(255, 0, 0)
PRINT r1
PRINT r2
PRINT r3
If you set a 32bit colour CONST, and then try to use it in a non-32bit mode, it will simply zap it at that point to the nearest colour in the current screen palette.