01-17-2023, 05:47 PM
(01-17-2023, 10:40 AM)SMcNeill Wrote:(01-17-2023, 09:41 AM)mnrvovrfc Wrote: Otherwise it would be easy to remap a register from 0-255 for "_RGB32" to 0-63 for "PALETTE", just divide by four.
Divide by 4 doesn't quite do it.
I meant from "_RGB32" to "PALETTE", not the way around, but anyway... it has to do with the limitations of the older equipment (VGA and MCGA). The 0-63 for each register was looked up from the Wiki page about "PALETTE", the first syntax.
Quote:Syntax
PALETTE [attribute%, red% + (green% * 256) + (blue% * 65536)]
PALETTE [existingAttribute%, newAttribute%]
Description
red%, green% and blue% values can range from 0 to 63. Many color shades are possible in non-DAC color attributes.
from:
https://qb64phoenix.com/qb64wiki/index.php/PALETTE