In the last tutorial, you have seen how to write text on screen with white color. Well, what if you want to write with some other color?
You can set the text color using this function:
where color can be any of these define colors:
These colors are not only available for this function only, there are other function also which can have these colors in their argument.
Given below is an example to show the use of different colors and the response of the TFT Screen:
But what if I want to have a random colour?
Well, there also a function to generate a custom colour:
tft.Color565(uint8_t r, uint8_t g, uint8_t b);
where r, g, b are the red, green and blue value ranging from 0 to 255.
You can also vary text size using function:
Given below is the Arduino sketch to show you different text size.