The COLOR SPRITE
command allows you to redefine the (common) colors used by the graphics chipset
for the sprites, where this is possible and/or they are available. "Redefinition" means
assigning one of the possible colors to specific registers called "palette registers".
On some systems this is not possible at all, due to limitations of the chipset or
the absence of registers or even of the sprites: for this reason, in such cases the
command is ignored. On other systems this corresponds to the modification of specific
registers, to which one of the available colors is assigned. On others it is possible
to assign certain shades, which therefore go beyond the number of available colors.
Where it is possible to assign a shade, the value can range from 0
to the constant
SHADES
. However, it may be more practical to use the RGB
function, which
allows you to calculate the shade starting from the color components (red, green and blue).
COLOR SPRITE index TO color
COLOR SPRITE 1 TO YELLOW
Join BASIC 10Liner Contest with ugBASIC!
An interesting competition is held at the beginning of each year: the
BASIC 10Liner Contest.
It is possible to use ugBASIC to participate in the next
"BASIC10Liner" competition, in the following categories:
COLOR SPRITE ↔ CrSpr
If you have found a problem with this keyword, if you think there is a bug or, more
simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!
open an issue
BACK TO KEYWORDS