Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RGB565 Color Definitions for TFT #15099

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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