Allow me to clarify this for everyone with a few simple questions and answers.
RED = _RGB(255, 0, 0)
Now, somebody tell me what number that RED is. Anyone. Please!
With the information provided above, you absolutely can't tell me what that value is.
In SCREEN 0, it would be color 4.
In SCREEN 13, it would be color 40.
In SCREEN _NEWIMAGE(x, y, 256), it would be 40.
In SCREEN _NEWIMAGE(x, y, 32), it would be &HFFFF0000~&.
By itself, it's... undefined. Impossible to calculate. It's NAN, if it's anything.
You have to know the SCREEN mode to be able to determine what that color number is.
_RGB is a transformative function which returns a value based upon the screen mode it's associated with.
So when we do this:
CONST RED = _RGB(255, 0, 0)
What screen is that associated with? Is your red on a SCREEN 0 text screen? OR are you looking for red on a 256 color screen? How about on SCREEN 7? How the BLEEP is CONST supposed to know that???
---------
So.... How would one fix this?
Wouldn't you simply SPECIFY THE SCREEN MODE??
CONST RED = _RGB(255, 0, 0, 0) 'This is color 4, because it's on SCREEN 0 as defined in that last parameter.
CONST RED = _RGB(255, 0, 0, 256) 'This is color 40, because it's on a 256 color screen.
You need an extra parameter with _RGB and CONST to specify the screen mode from which you want to get your color value.
@bplus was close when he said he thought it was an image handle, but it's not an image handle. It's the SCREEN MODE.
And _RGB32 doesn't have this same need to specify a screen mode as it *ONLY* returns values for a 32-bit color screen.
So this is *not* a bug. It's a design feature so you can specify which screen mode you want to use _RGB with and associate those values with for the proper color match on that screen mode.
RED = _RGB(255, 0, 0)
Now, somebody tell me what number that RED is. Anyone. Please!
With the information provided above, you absolutely can't tell me what that value is.
In SCREEN 0, it would be color 4.
In SCREEN 13, it would be color 40.
In SCREEN _NEWIMAGE(x, y, 256), it would be 40.
In SCREEN _NEWIMAGE(x, y, 32), it would be &HFFFF0000~&.
By itself, it's... undefined. Impossible to calculate. It's NAN, if it's anything.
You have to know the SCREEN mode to be able to determine what that color number is.
_RGB is a transformative function which returns a value based upon the screen mode it's associated with.
So when we do this:
CONST RED = _RGB(255, 0, 0)
What screen is that associated with? Is your red on a SCREEN 0 text screen? OR are you looking for red on a 256 color screen? How about on SCREEN 7? How the BLEEP is CONST supposed to know that???
---------
So.... How would one fix this?
Wouldn't you simply SPECIFY THE SCREEN MODE??
CONST RED = _RGB(255, 0, 0, 0) 'This is color 4, because it's on SCREEN 0 as defined in that last parameter.
CONST RED = _RGB(255, 0, 0, 256) 'This is color 40, because it's on a 256 color screen.
You need an extra parameter with _RGB and CONST to specify the screen mode from which you want to get your color value.
@bplus was close when he said he thought it was an image handle, but it's not an image handle. It's the SCREEN MODE.
And _RGB32 doesn't have this same need to specify a screen mode as it *ONLY* returns values for a 32-bit color screen.
So this is *not* a bug. It's a design feature so you can specify which screen mode you want to use _RGB with and associate those values with for the proper color match on that screen mode.

