theme

package
v1.0.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package theme is the color vocabulary the UI draws with. A Theme names colors by role, the same roles the web client's DaisyUI theme block declares (base, primary, secondary, accent, neutral, info, success, warning, error, plus the chat-specific username), so a theme ported from the site's CSS is a copy of numbers, not a redesign. Widgets ask for a role, never a color, which is what lets a second theme exist without touching them (ADR 0005).

Colors are exact sRGB; Bubble Tea's renderer downsamples them to the terminal's profile and drops them under NO_COLOR, so nothing here needs to know what the terminal can show.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

Names lists the built-in themes, sorted, for help text and errors.

Types

type Theme

type Theme struct {
	Name string

	// Base100 is the app background, Base200 panels, Base300 borders and
	// hover. The terminal keeps its own background (see ADR 0005), so
	// Base100 is what the splash paints and what text roles are tuned
	// against, not what the chat screen fills.
	Base100, Base200, Base300 color.Color
	// BaseContent is body text on the base surfaces.
	BaseContent color.Color

	// Primary is the brand color; PrimaryContent is text on it. The
	// status bar is primary on primary-content, and the splash wordmark
	// is drawn in primary.
	Primary, PrimaryContent color.Color
	// Secondary is the second warm tone; on the site it carries links,
	// MOTD framing and mod names.
	Secondary, SecondaryContent color.Color
	// Accent is the loud one, reserved for what must stand out: DMs.
	Accent, AccentContent color.Color
	// Neutral is chrome that is neither surface nor brand.
	Neutral, NeutralContent color.Color

	Info, InfoContent       color.Color
	Success, SuccessContent color.Color
	Warning, WarningContent color.Color
	Error, ErrorContent     color.Color

	// Username colors ordinary speakers. The site keeps it outside the
	// DaisyUI block because DaisyUI has no such role; it is a role here
	// because most of the transcript is names and they must not read as
	// the loud brand color.
	Username color.Color
}

Theme is one named palette. Every field is set for every built-in theme; a widget may rely on that.

func Default

func Default() Theme

Default is the theme used when none is asked for: the site's own.

func Lookup

func Lookup(name string) (Theme, bool)

Lookup finds a built-in theme by name. The name is what NGCHAT_THEME carries, so an unknown one is the caller's error to report with Names, not something to fall back from silently.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL