diff options
| author | Dan Halbert <halbert@adafruit.com> | 2019-07-22 22:30:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-22 22:30:28 -0400 |
| commit | 82ab998cd591bc8a4dea45e4ee0baf3601819834 (patch) | |
| tree | 3394297eb9729a925108c436767a9655d925a487 /tools | |
| parent | 7cb2aa2d62d37c3faeec4c52b2e4d3ecdc29b60e (diff) | |
| parent | 1d1b8703b6c108b72a1abda9312646895f542672 (diff) | |
Merge pull request #1998 from tannewt/monocolor
Add support for grayscale displays
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gen_display_resources.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index 2c674c8eb..a731cbd9c 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -98,14 +98,21 @@ c_file.write("""\ """) c_file.write("""\ -uint32_t terminal_transparency[1] = {0x00000000}; - -// These colors are RGB 565 with the bytes swapped. -uint32_t terminal_colors[1] = {0xffff0000}; +_displayio_color_t terminal_colors[2] = { + { + .rgb888 = 0x000000, + .rgb565 = 0x0000, + .luma = 0x00 + }, + { + .rgb888 = 0xffffff, + .rgb565 = 0xffff, + .luma = 0xff + }, +}; displayio_palette_t supervisor_terminal_color = { .base = {.type = &displayio_palette_type }, - .opaque = terminal_transparency, .colors = terminal_colors, .color_count = 2, .needs_refresh = false |
