You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.
Mammad900 edited this page Aug 29, 2020
·
1 revision
dim(color)
Summary
Dims an RGB565 color
Parameters
color (uint16_t) : The color to dim
Returns
A new color with half r,g,b values.
Examples
dim(TFT_GREEN) // Returns dark green
Source
uint16_tdim(uint16_t color){
int R = ((color & 0xF800) >> 9); // Get half of Redint G = ((color & 0x7E0) >> 4); // Get half of greenint B = ((color & 0x1F) << 2); // Get half of bluereturn tft.color565(R, G, B); //Re-assemble the color
}