Phoenard
Classes | Macros
PHNPalette.h File Reference

Contains the PHN_Palette, a color container, and several palette macros. More...

#include "PHNDisplayHardware.h"
#include <utility/PHNUtils.h>

Go to the source code of this file.

Classes

class  PHN_Palette
 A color Palette that can store up to 256 colors. More...
 

Macros

#define PALETTE(...)   PHN_Palette((const color_t[]) {__VA_ARGS__}, sizeof((const color_t[]) {__VA_ARGS__}) / sizeof(color_t))
 Macro to turn a list of colors in a PHN_Palette. More...
 
Palette constants

Macros for default image state palettes

#define PALETTE_NORMAL   PALETTE(WHITE, RED, BLACK)
 
#define PALETTE_PRESSED   PALETTE(YELLOW, RED, BLACK)
 
#define PALETTE_CLICKED   PALETTE(BLUE, RED, WHITE)
 

Detailed Description

Contains the PHN_Palette, a color container, and several palette macros.

Macro Definition Documentation

#define PALETTE (   ...)    PHN_Palette((const color_t[]) {__VA_ARGS__}, sizeof((const color_t[]) {__VA_ARGS__}) / sizeof(color_t))

Macro to turn a list of colors in a PHN_Palette.

Usage: PHN_Palette pal = PALETTE(RED, BLACK, BLUE);