Skip to content
Discussion options

You must be logged in to vote

There is a function for this:

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

So:

uint16_t col = tft.color565(255,255,0);

Will return the correct 16 bit value for a yellow colour.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Rollmops67
Comment options

Answer selected by Rollmops67
Comment options

You must be logged in to vote
1 reply
@Rollmops67
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants