Ask HN: In your experience, what are sound conventions for e-ink UI development?
Discussion: Establishing Best Practices for E-Ink User Interface Design
The following is a synthesis of a community discussion regarding the specialized constraints and optimal conventions for developing interfaces on Electrophoretic Displays (EPD), commonly known as e-ink.
The Fundamental Challenge: Physics vs. UX
Unlike OLED or LCD screens, e-ink is not a light-emitting source but a physical rearrangement of charged particles. This creates a unique set of constraints: instantaneous updates slow refresh rates, ghosting, and high latency.
"The biggest mistake developers make is treating an e-ink screen like a slow tablet. It isn't a slow tablet; it's a digital piece of paper. You have to design for the medium, not fight it."
The Refresh Dilemma
The core of e-ink UI development revolves around managing the Refresh Cycle. There are generally three modes of operation:
| Mode | Speed | Visual Quality | Ghosting | Use Case |
|---|---|---|---|---|
| Full Refresh | Very Slow | Perfect | None | Page turns, full UI shifts |
| Partial Refresh | Fast | Degrades | High | Clock updates, cursor movement |
| A2/Fast Mode | Very Fast | Low Contrast | Severe | Basic animations, scrolling |
The Logic of Updating
The decision process for when to trigger a specific refresh type can be visualized as follows:
Core Design Conventions
1. Visual Aesthetics and Contrast
Because e-ink lacks a wide color gamut and high brightness, developers should adhere to these rules:
- High Contrast: Stick to pure black (
#000000) and pure white (#FFFFFF). - Avoid Gradients: Dithering is necessary if grayscale is required, but solid blocks are preferred.
- Bold Typography: Use thick, sans-serif fonts to ensure readability against the grainy texture of the screen.
- Avoid Thin Lines: Hairlines often disappear or look "broken" during partial refreshes.
2. Managing "Ghosting"
Ghosting occurs when remnants of the previous image remain visible. To combat this, developers implement a refresh counter.
The Math of Refreshing: If is the number of partial updates, and is the threshold for a mandatory full refresh:
3. Interaction Patterns
- Feedback Loops: Since the screen doesn't update instantly, provide immediate tactile or auditory feedback (e.g., a button click sound) so the user knows the input was registered.
- Static Layouts: Minimize moving elements. Instead of a scrolling list, consider a "paginated" approach.
Technical Implementation
When writing the driver logic, it is crucial to minimize the data sent to the display controller to save power and time.
// Example: Pseudo-code for a conditional refresh
void updateDisplay(Image newFrame) {
if (newFrame.isMajorChange()) {
display.fullRefresh(); // Clears ghosting
display.draw(newFrame);
} else {
Image delta = calculateDelta(currentFrame, newFrame);
display.partialUpdate(delta); // Fast, but adds ghosting
}
updateRefreshCounter();
}
Power Consumption
One of the primary advantages of e-ink is that it requires zero power to maintain an image. The energy cost is only incurred during the transition:
Developer's Checklist for E-Ink UI
- Eliminate all unnecessary animations.
- Implement a global refresh timer to clear ghosting.
- Verify that all critical text is high-contrast.
- Test the UI under different lighting conditions (ambient light is the backlight).
- Optimize the
deltacalculation to reduce SPI bus traffic.
Final Thoughts
Designing for e-ink requires a shift in mindset from fluidity to stability. By embracing the limitations of the hardware—rather than trying to emulate a smartphone—developers can create interfaces that are not only functional but also deeply comfortable for long-term viewing.
Figure 1: Example of high-contrast layout vs. low-contrast grayscale.