-
-
Notifications
You must be signed in to change notification settings - Fork 2
Color palette
Each color you'll use has it's own index number you use to reference the number, and GraphX
uses an 8-bit color palette, meaning you have 256 unique colors (numbers 0 through 255). The default palette is the xLIBC palette, as shown below, with the default colors and their corresponding index number (in both decimal and hexadecimal):
You can find the full image here. You will use the index numbers in every command that asks for a color. You can set your own color palette by using the SetPalette(
or det(4
command. For creating a custom palette, you have to hand this function a pointer to a string with 256*2
bytes (each color is worth 2 bytes). If you wish to reset the palette back to its default after setting your own, you can use SetDefaultPalette(
or det(3)
.
ICE Compiler | Peter Tillema
- Introduction
- Building your first program
- Math and numbers
- Variables
- Standard system commands
- Program flow control
- Pointers
- Graphics
- Sprites
- Tilemaps
- Useful routines