aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/gdisp_colors.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdisp/gdisp_colors.h')
-rw-r--r--src/gdisp/gdisp_colors.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gdisp/gdisp_colors.h b/src/gdisp/gdisp_colors.h
index 8c72f9ac..5bfcfca2 100644
--- a/src/gdisp/gdisp_colors.h
+++ b/src/gdisp/gdisp_colors.h
@@ -328,6 +328,13 @@ typedef uint16_t colorformat;
#endif
#define HTML2COLOR(h) ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h)))
+ // Special hack to allow alpha on RGB888
+ #if GDISP_PIXELFORMAT == GDISP_PIXELFORMAT_RGB888
+ #define GFXTRANSPARENT (0xFF000000)
+ #define AHTML2COLOR(h) ((h) ^ 0xFF000000)
+ #define ARGB2COLOR(a,r,g,b) ((((COLOR_TYPE)(((a) ^ 0xFF) & 0xFF)) << 24) | RGB2COLOR_R(r) | RGB2COLOR_G(g) | RGB2COLOR_B(b))
+ #endif
+
//-------------------------
// Gray-scale color system
//-------------------------