theme

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 7 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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingSelection = errors.New("missing required ui.selection scope")
	ErrInvalidTheme     = errors.New("invalid theme")
)

Functions

This section is empty.

Types

type Theme

type Theme struct {
	// contains filtered or unexported fields
}

func Decode

func Decode(data map[string]any) (*Theme, []string)

func Default

func Default() (*Theme, error)

func Load

func Load(name string) (*Theme, error)

func (*Theme) Dimmed added in v0.1.25

func (t *Theme) Dimmed(pct int) *Theme

Dimmed returns a copy of the theme with every style darkened by pct, for rendering unfocused panes

func (*Theme) Get

func (t *Theme) Get(scope string) tui.Style

func (*Theme) Is16Color

func (t *Theme) Is16Color() bool

func (*Theme) Name

func (t *Theme) Name() string

func (*Theme) Quantized added in v0.1.35

func (t *Theme) Quantized() *Theme

Quantized returns a copy of the theme with every style snapped onto the 256-color palette, for terminals without true color

func (*Theme) RainbowLength

func (t *Theme) RainbowLength() int

func (*Theme) Scopes

func (t *Theme) Scopes() []string

func (*Theme) TryGet

func (t *Theme) TryGet(scope string) (tui.Style, bool)

func (*Theme) TryGetExact

func (t *Theme) TryGetExact(scope string) (tui.Style, bool)

func (*Theme) Validate

func (t *Theme) Validate() error

Jump to

Keyboard shortcuts

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