Raquet / Wiki / v1x / Palettes

Palettes

 Raquet offers the ability to change the palette's colors to anything you want; but by default we use the "Digital Prime" Palette by FirebrandX. (see below)

Color names are formatted by left to right, up to down rows, and are numbered in base 16, which is represented in the image (see above above). The first row is 0x00 through 0x0F, second is 0x10 through 0x1F, so on so forth.

Note: Each row end (0x0F, 0x1F, 0x2F, 0x3F) is transparency.

 The default palette colors are defined in the src/Raquet/Raquet_Palette.c file as an array, and can be accessed via Raquet_GlobalPalette[num] where num is the hex value pertaining to the color you wish to access. For example: to access palette color 0x2A, we would use Raquet_GlobalPalette[0x2A].

Table of Contents

Modifying The Default Palette

 You can modify the palette within the Raquet.h file very easily, as well as add additional colors if you desire. The colors are stored in a hexadecimal RGBA format with 8 bits per value. An example would be: If you want gross yellow, you would assign a palette to 0x00FFFFFF, or with some translucency: 0x00FFFF80

/*
**********************************
*     DEFINE CUSTOM PALETTES     *
**********************************
* First 2 hex digits are Red
* Second 2 hex digits are Green
* Third 2 hex digits are Blue
* Fourth 2 hex digits are Alpha
*/

const Palette MY_PAL20 = {0x00FFFF80};

You will then be able to address it like any other Palette in Raquet.