Colour Encoding - TBTerra/pictor GitHub Wiki

Colour Encoding

All colours used in Pictor are stored in a single 16-bit integer with 6 bits of red colour value, 5 bits of green colour value & 6 bits of blue colour value. This allows for efficient processing inside Pictor.


Commands

uint16_t encode656Colour(const uint8_t Red, const uint8_t Green, const uint8_t Blue);

Creates a colour encoded in 656-RGB from individual RGB bytes, for use in other Pictor functions.

Parameters:

  1. Red, Green, Blue - RGB values as 8-bit integers.

Return Value:

  • 16-bit integer of 656-RGB encoded colour.
⚠️ **GitHub.com Fallback** ⚠️