Fix low temperature text visibility on dark terminal backgrounds#225
Merged
kordianbruck merged 2 commits intomasterfrom Apr 11, 2026
Merged
Fix low temperature text visibility on dark terminal backgrounds#225kordianbruck merged 2 commits intomasterfrom
kordianbruck merged 2 commits intomasterfrom
Conversation
Agent-Logs-Url: https://github.com/schachmat/wego/sessions/92c44222-8f2f-48d4-bf71-d6dd44941abb Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix text visibility for low temperatures in terminal
Fix low temperature text visibility on dark terminal backgrounds
Apr 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Cold temperature values (< -3°C) were rendered in deep-blue ANSI 256 colors (21 =
#0000ff, 27 =#005fff) that are nearly invisible against dark terminal backgrounds, as shown above.Description
frontends/colors.go(new) —darkBackground()readsCOLORFGBG(set by rxvt, xterm, etc.; format"fg;bg"or"fg;default;bg") to detect terminal background. Returnstrue(dark) when unset, since dark terminals are the dominant use case. Dark = color index 0–6 or 8; light = 7 or 9–15.frontends/ascii-art-table.goandfrontends/emoji.go— colmap hoisted outside thecolorclosure so it can be patched before use. On dark backgrounds, the 5 cold-temperature color entries are replaced:#0000ff☠️#0087ff#005fff☠️#00afff#00d7ff#00ffff#00ffffLight backgrounds keep the original darker blues. Warm-end colors are untouched.
Steps for Testing
COLORFGBGset, orCOLORFGBG=15;0): runwegowith a location that has sub-zero temperatures — cold temp values should now render in clearly visible cyan-blue.COLORFGBG=0;15): cold temps should use the original deep-blue palette.COLORFGBG=0;15/COLORFGBG=15;0to toggle behavior without changing terminal theme.Screenshots
Before (dark background — cold temperatures barely visible):