[epaper_spi] Enhance color capabilities for spectra e6 with dithering #3467
Unanswered
super-qua
asked this question in
Component enhancements
Replies: 1 comment
-
|
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Component name
epaper_spi
Link to component documentation on our website
https://esphome.io/components/display/epaper_spi/
Describe the enhancement
Currently the implementation for mapping colors for the spectra e6 in https://github.com/esphome/esphome/blob/dev/esphome/components/epaper_spi/epaper_spi_spectra_e6.cpp limits the colors to the 6 built-in colors of the display.
By applying dithering techniques, this could be enhanced to display more colors, for example for LVGL widgets filling or for text colors.
In a simple form, limited to any combination of the 6 built-in colors, this could be managed by applying a checkerboard dithering between two built in colors, producing colors like cyan, magenta, orange, etc.
Example1: color magenta (
rgb(255,0,255))instead of returning
REDfor every pixel in a 3x3 area, return(R=RED, B=BLUE) which produces a purple effect for the viewer.
Example2: lighter red color (
rgb(255,130,130)) as a mix ofREDandWHITEpixelsNote: This does not require more sophisticated dithering algorithms like FloydSteinberg, as in this simple form only a static mapping is applied. Therefore it's less compute-intensive.
By combining only two built-in colors, theoretically 15 more colors could be displayed on the epaper which would then result in 21 colors instead of 6.
Use cases
Allows more colors to be displayed on the epaper screen when drawing objects.
Anything else?
Blog post which explains the desired result in more detail: https://myembeddedstuff.com/e-ink-spectra-6-color
This is a continuation of the discussion in esphome/esphome#12709
Beta Was this translation helpful? Give feedback.
All reactions