Skip to content

Commit

Permalink
Add RGB565 Color Definitions for TFT (MarlinFirmware#15099)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbycandra authored and thinkyhead committed Aug 31, 2019
1 parent 9449201 commit 26fa085
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions Marlin/src/lcd/dogm/u8g_dev_tft_320x240_upscale_from_128x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,31 @@

// see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html

#define COLOR_BLACK 0x0000
#define COLOR_WHITE 0xFFFF
#define COLOR_BLUE 0x21DD
#define COLOR_RED 0xF800
#define COLOR_DARK 0x0003 // Some dark color
#define COLOR_GREY 0x39E7
#define COLOR_YELLOW 0xEFC0
#define COLOR_ORANGE 0xFC00
#define COLOR_GREEN 0x77E0
#define COLOR_BLACK 0x0000 // #000000
#define COLOR_WHITE 0xFFFF // #FFFFFF
#define COLOR_SILVER 0xC618 // #C0C0C0
#define COLOR_GREY 0x7BEF // #808080
#define COLOR_DARKGREY 0x4208 // #404040
#define COLOR_DARKGREY2 0x39E7 // #303030
#define COLOR_DARK 0x0003 // Some dark color

#define COLOR_RED 0xF800 // #FF0000
#define COLOR_LIME 0x7E00 // #00FF00
#define COLOR_BLUE 0x001F // #0000FF
#define COLOR_YELLOW 0xFFE0 // #FFFF00
#define COLOR_MAGENTA 0xF81F // #FF00FF
#define COLOR_FUCHSIA 0xF81F // #FF00FF
#define COLOR_CYAN 0x07FF // #00FFFF
#define COLOR_AQUA 0x07FF // #00FFFF

#define COLOR_MAROON 0x7800 // #800000
#define COLOR_GREEN 0x03E0 // #008000
#define COLOR_NAVY 0x000F // #000080
#define COLOR_OLIVE 0x8400 // #808000
#define COLOR_PURPLE 0x8010 // #800080
#define COLOR_TEAL 0x0410 // #008080

#define COLOR_ORANGE 0xFC00 // #FF7F00

#ifndef TFT_MARLINUI_COLOR
#define TFT_MARLINUI_COLOR COLOR_WHITE
Expand Down

0 comments on commit 26fa085

Please sign in to comment.