PALETTE: why does it take "BGR" colour instead of "RGB"?
#5
(01-17-2023, 03:59 AM)CharlieJV Wrote: It just seems a little odd that you can't apply colours that you would get via _RGB32() in the PALETTE statement.

Is there some history to explain the second parameter for colour?

Remember that QuickBASIC's "best" was either 640x480 with 16 colors, or the "MCGA" mode of 320x200 with 256 colors. With either it was possible to set red, green and blue attributes, but there was no such thing as alpha channel. In addition, the second parameter to "PALETTE" could only hold an INTEGER, not LONG. That's why "PALETTE" is meant these days for emulations and should not be used in new QB64(PE) programs.

Otherwise it would be easy to remap a register from 0-255 for "_RGB32" to 0-63 for "PALETTE", just divide by four. But have to ignore alpha channel which is a bummer for some applications. The extended display modes for "PUT" graphics statement don't make up.
Reply


Messages In This Thread
RE: PALETTE: why does it take "BGR" colour instead of "RGB"? - by mnrvovrfc - 01-17-2023, 09:41 AM



Users browsing this thread: 4 Guest(s)