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.h79
1 files changed, 52 insertions, 27 deletions
diff --git a/src/gdisp/gdisp_colors.h b/src/gdisp/gdisp_colors.h
index 0973e561..323303e0 100644
--- a/src/gdisp/gdisp_colors.h
+++ b/src/gdisp/gdisp_colors.h
@@ -80,30 +80,55 @@ typedef uint16_t colorformat;
* @name Some basic colors
* @{
*/
-#define White HTML2COLOR(0xFFFFFF)
-#define Black HTML2COLOR(0x000000)
-#define Gray HTML2COLOR(0x808080)
-#define Grey Gray
-#define Blue HTML2COLOR(0x0000FF)
-#define Red HTML2COLOR(0xFF0000)
-#define Fuchsia HTML2COLOR(0xFF00FF)
-#define Magenta Fuchsia
-#define Green HTML2COLOR(0x008000)
-#define Yellow HTML2COLOR(0xFFFF00)
-#define Aqua HTML2COLOR(0x00FFFF)
-#define Cyan Aqua
-#define Lime HTML2COLOR(0x00FF00)
-#define Maroon HTML2COLOR(0x800000)
-#define Navy HTML2COLOR(0x000080)
-#define Olive HTML2COLOR(0x808000)
-#define Purple HTML2COLOR(0x800080)
-#define Silver HTML2COLOR(0xC0C0C0)
-#define Teal HTML2COLOR(0x008080)
-#define Orange HTML2COLOR(0xFFA500)
-#define Pink HTML2COLOR(0xFFC0CB)
-#define SkyBlue HTML2COLOR(0x87CEEB)
+#define GFX_WHITE HTML2COLOR(0xFFFFFF)
+#define GFX_BLACK HTML2COLOR(0x000000)
+#define GFX_GRAY HTML2COLOR(0x808080)
+#define GFX_GREY GFXGRAY
+#define GFX_BLUE HTML2COLOR(0x0000FF)
+#define GFX_RED HTML2COLOR(0xFF0000)
+#define GFX_FUCHSIA HTML2COLOR(0xFF00FF)
+#define GFX_MAGENTA GFXFUCHSIA
+#define GFX_GREEN HTML2COLOR(0x008000)
+#define GFX_YELLOW HTML2COLOR(0xFFFF00)
+#define GFX_AQUA HTML2COLOR(0x00FFFF)
+#define GFX_CYAN GFXAQUA
+#define GFX_LIME HTML2COLOR(0x00FF00)
+#define GFX_MAROON HTML2COLOR(0x800000)
+#define GFX_NAVY HTML2COLOR(0x000080)
+#define GFX_OLIVE HTML2COLOR(0x808000)
+#define GFX_PURPLE HTML2COLOR(0x800080)
+#define GFX_SILVER HTML2COLOR(0xC0C0C0)
+#define GFX_TEAL HTML2COLOR(0x008080)
+#define GFX_ORANGE HTML2COLOR(0xFFA500)
+#define GFX_PINK HTML2COLOR(0xFFC0CB)
+#define GFX_SKYBLUE HTML2COLOR(0x87CEEB)
/** @} */
+#if GFX_COMPAT_V2 && GFX_COMPAT_OLDCOLORS
+ #define White GFX_WHITE
+ #define Black GFX_BLACK
+ #define Gray GFX_GRAY
+ #define Grey GFX_GREY
+ #define Blue GFX_BLUE
+ #define Red GFX_RED
+ #define Fuchsia GFX_FUCHSIA
+ #define Magenta GFX_MAGENTA
+ #define Green GFX_GREEN
+ #define Yellow GFX_YELLOW
+ #define Aqua GFX_AQUA
+ #define Cyan GFX_CYAN
+ #define Lime GFX_LIME
+ #define Maroon GFX_MAROON
+ #define Navy GFX_NAVY
+ #define Olive GFX_OLIVE
+ #define Purple GFX_PURPLE
+ #define Silver GFX_SILVER
+ #define Teal GFX_TEAL
+ #define Orange GFX_ORANGE
+ #define Pink GFX_PINK
+ #define SkyBlue GFX_SKYBLUE
+#endif
+
#if defined(__DOXYGEN__)
/**
* @brief The color system (grayscale, palette or truecolor)
@@ -138,7 +163,7 @@ typedef uint16_t colorformat;
/**
* @brief Does the color need masking to remove invalid bits
*/
- #define COLOR_NEEDS_MASK FALSE
+ #define COLOR_NEEDS_MASK GFXOFF
/**
* @brief If the color needs masking to remove invalid bits, this is the mask
@@ -248,9 +273,9 @@ typedef uint16_t colorformat;
#error "GDISP: Cannot define color types with more than 32 bits"
#endif
#if COLOR_TYPE_BITS == COLOR_BITS
- #define COLOR_NEEDS_MASK FALSE
+ #define COLOR_NEEDS_MASK GFXOFF
#else
- #define COLOR_NEEDS_MASK TRUE
+ #define COLOR_NEEDS_MASK GFXON
#endif
#define COLOR_MASK() ((1 << COLOR_BITS)-1)
@@ -363,9 +388,9 @@ typedef uint16_t colorformat;
#error "GDISP: Cannot define gray-scale color types with more than 8 bits"
#endif
#if COLOR_TYPE_BITS == COLOR_BITS
- #define COLOR_NEEDS_MASK FALSE
+ #define COLOR_NEEDS_MASK GFXOFF
#else
- #define COLOR_NEEDS_MASK TRUE
+ #define COLOR_NEEDS_MASK GFXON
#endif
#define COLOR_MASK() ((1 << COLOR_BITS)-1)