Documentation
¶
Index ¶
- Variables
- type Theme
- func (t *Theme) Dimmed(pct int) *Theme
- func (t *Theme) Get(scope string) tui.Style
- func (t *Theme) Is16Color() bool
- func (t *Theme) Name() string
- func (t *Theme) Quantized() *Theme
- func (t *Theme) RainbowLength() int
- func (t *Theme) Scopes() []string
- func (t *Theme) TryGet(scope string) (tui.Style, bool)
- func (t *Theme) TryGetExact(scope string) (tui.Style, bool)
- func (t *Theme) Validate() error
Constants ¶
This section is empty.
Variables ¶
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 ¶
Decode builds a theme from raw TOML, returning warnings for entries it could not parse rather than failing
func (*Theme) Dimmed ¶ added in v0.1.25
Dimmed returns a copy of the theme with every style darkened by pct, for rendering unfocused panes
func (*Theme) Get ¶
Get resolves a scope, falling back to its dotted ancestors, and yields the zero style when nothing matches
func (*Theme) Is16Color ¶
Is16Color reports whether the theme names only palette colors, so it renders correctly without true color
func (*Theme) Quantized ¶ added in v0.1.35
Quantized returns a copy of the theme with every style snapped onto the 256-color palette, for terminals without true color
func (*Theme) RainbowLength ¶
RainbowLength is the number of rainbow bracket colors defined
func (*Theme) TryGetExact ¶
TryGetExact resolves a scope without ancestor fallback