Skip to content
Discussion options

You must be logged in to vote

The library uses either 18 bit, or more usually 16 bit colours (5bits red, 6 bits green, 5 bits blue or "565 colours). These functions are provided for colour conversion:

  // Colour conversion
           // Convert 8 bit red, green and blue to 16 bits
  uint16_t color565(uint8_t red, uint8_t green, uint8_t blue);

           // Convert 8 bit colour to 16 bits
  uint16_t color8to16(uint8_t color332);
           // Convert 16 bit colour to 8 bits
  uint8_t  color16to8(uint16_t color565);

           // Convert 16 bit colour to/from 24 bit, R+G+B concatenated into LS 24 bits
  uint32_t color16to24(uint16_t color565);
  uint32_t color24to16(uint32_t color888);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@9Rune5
Comment options

@Bodmer
Comment options

Answer selected by Bodmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants