Documentation
¶
Overview ¶
Package render holds the visual constant tables shared across screens — body color palette, UI tier colors for status / nodes / trajectory.
v0.5.1 source of truth per docs/state-of-game.md §3 v0.5: a hardcoded table here, keyed by body name (or stellar tint by temperature for non-Sol stars). The v0.7 config-file body loader will promote the table to per-body JSON fields with a one-shot migration; in the meantime this single file is the only place to edit when adding a new body or retuning a color.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ColorAlert = lipgloss.Color("#FF5F5F") // hard errors, peri-below-surface ColorWarning = lipgloss.Color("#FFAF00") // warp clamps, near-collision ColorPlannedNode = lipgloss.Color("#5FD7FF") // maneuver-node markers ColorTrajectory = lipgloss.Color("#FFFFFF") // home-SOI trajectory preview ColorForeignSOI = lipgloss.Color("#D75FFF") // post-SOI-crossing trajectory segments ColorDim = lipgloss.Color("#5F5F5F") // background / inactive )
UI tier colors — used for non-body UI elements that need consistent semantic colors across screens. Independent of the body palette so editing one doesn't shift the other.
Functions ¶
func ColorFor ¶
func ColorFor(b bodies.CelestialBody) lipgloss.Color
ColorFor returns the palette color for a body. Falls back to a per-bodyType default for bodies not in the table (e.g. fictional systems' planets), and finally to ColorTrajectory for unrecognised types. Star colors come from StellarTint when temperature is set.
func StellarTint ¶
StellarTint maps a star's effective temperature (Kelvin) to a rough visible-light color. Used for non-Sol stars that don't have a hand-picked entry in bodyPalette. Banding is coarse — five buckets covering M-dwarf through O-class.
Types ¶
This section is empty.