{
  "id": 13108312,
  "title": "There are many themes, but this one is yours",
  "url": "https://urgent.news/2026/10/09/there-are-many-themes-but-this-one-is-yours",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-09T12:08:09.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://earendil.com/posts/system-theme/"
  },
  "original_language": "en",
  "account": "At Earendil, our focus is creating products that respect users' choices. In refreshing the Pi terminal, we wanted a theme that adapts to the terminal it runs in, reflecting users' existing preferences. The result is the new system theme, now Pi's default, which adapts to the terminal's colors.\n\nContrast plays a crucial role in terminal themes. Picking colors is a matter of taste for the user, but ensuring sufficient contrast is essential for readability. However, measuring contrast is complex, as perceptions vary among individuals. To address this, we developed a survey to help users understand their color perception.\n\nEach terminal theme consists of 16 ANSI colors, but the standard doesn't specify their appearance or relationship to the background. Bright colors emerged from terminals rendering bold text in brighter hues, which gave them a greater contrast. We analyzed over 460 themes in Ghostty, finding that bright colors maintain higher contrast in dark themes roughly 60% of the time, while in light themes, they only have about a quarter of that contrast.\n\nThe WCAG 2 contrast ratio measures contrast, ranging from 1:1 (no contrast) to 21:1 (black on white). Normal text should reach at least 4.5:1, while large text and UI elements require 3:1. Many themes prioritize aesthetics over accessibility, resulting in poor contrast. For instance, bright black often fails to meet the minimum contrast ratio of 3:1 in most dark themes, posing challenges for building accessible TUIs.\n\nOur terminal theme defines 60 color roles, from body text and dim text to panels and error messages. We aimed to use users' colors while ensuring all roles remain readable. Contrast is primarily driven by lightness, with saturation playing a lesser role. To achieve this, we designed the system theme to determine color lightness based on contrast requirements, taking hues and chroma from the terminal's palette.\n\nWe outlined rules for each UI element, ensuring sufficient contrast with backgrounds and minimizing distraction. Calculating these contrasts involved a loop, starting with panels and determining lightness based on specific rules. Our prototype utilized reversed contrast algorithms to compute the theme, with implementations available on GitHub for WCAG and perceptual contrast.",
  "summary": null,
  "key_points": [
    "Pi terminal theme adapts to user's terminal colors",
    "Survey developed to understand users' color perception",
    "Bright colors maintain higher contrast in dark themes 60% of the time"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}