theme

package
v0.270.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 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 defines named color palettes for the CLI and TUI. Each theme assigns semantic roles (primary, accent, success, …) to concrete colors, inspired by charmbracelet/crush's Styles approach. The active theme drives every style in the style package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

Names returns the available theme names, sorted, with "mono" last.

Types

type Theme

type Theme struct {
	Name string

	// Identity
	Primary   color.Color // headline accent (logo, active tab, cursor)
	Secondary color.Color // supporting accent
	Accent    color.Color // links, computed edges
	Keyword   color.Color // emphasis (modes, keywords)
	Violet    color.Color // second accent: mode chips, dialog borders/titles
	Magenta   color.Color // second accent: selection + palette highlights

	// Foreground tiers
	FgBase   color.Color
	FgSubtle color.Color
	FgFaint  color.Color

	// Background tiers
	BgBase      color.Color
	BgPanel     color.Color // sidebar column — darker than base
	BgRaised    color.Color // main pane, cards
	BgHighlight color.Color // chips, badges, pills, keycaps
	BgOverlay   color.Color // scrim/shadow behind dialogs
	Separator   color.Color

	// Status
	Success color.Color
	Warning color.Color
	Error   color.Color
	Info    color.Color

	// OnAccent is the text color placed on top of Primary backgrounds.
	OnAccent color.Color

	// GradStartHex/GradEndHex define the wordmark gradient endpoints as hex
	// strings (blended per-rune by style.Gradient). Empty = solid Primary.
	GradStartHex string
	GradEndHex   string
}

Theme is a semantic palette. Colors are concrete (dark-terminal tuned) so the look is consistent and vivid, matching the Crush aesthetic.

func Default

func Default() Theme

Default returns the default theme (Aurora — OpenFGA's signature look).

func Get

func Get(name string) (Theme, bool)

Get returns a theme by name and whether it was found.

func Mono

func Mono() Theme

Mono returns the no-color theme.

Jump to

Keyboard shortcuts

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