theme

package
v0.0.0-...-4f2898f Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	Color    string `json:"color" toml:"color" yaml:"color"`
	Gradient string `json:"gradient" toml:"gradient" yaml:"gradient"`
}

type Graph

type Graph struct {
	Color  string `json:"color" toml:"color" yaml:"color"`
	Height int    `json:"height" toml:"height" yaml:"height"`
}

type RGBColor

type RGBColor struct {
	Foreground string `json:"foreground" toml:"foreground" yaml:"foreground"`
	Background string `json:"background" toml:"background" yaml:"background"`
}

type Text

type Text struct {
	Untyped         RGBColor `json:"untyped" toml:"untyped" yaml:"untyped"`
	Typed           RGBColor `json:"typed" toml:"typed" yaml:"typed"`
	Error           RGBColor `json:"error" toml:"error" yaml:"error"`
	ErrorForeground RGBColor `json:"error_foreground" toml:"error_foreground" yaml:"error_foreground"`
}

type Theme

type Theme struct {
	File  string `json:"file" toml:"file" yaml:"file"`
	Text  Text   `json:"text" toml:"text" yaml:"text"`
	Bar   Bar    `json:"bar" toml:"bar" yaml:"bar"`
	Graph Graph  `json:"graph" toml:"graph" yaml:"graph"`
}

func DefaultTheme

func DefaultTheme() *Theme

func LoadViper

func LoadViper(v *viper.Viper, first bool) (*Theme, error)

func (Theme) BarColor

func (t Theme) BarColor() progress.Option

func (Theme) GraphColor

func (t Theme) GraphColor() asciigraph.AnsiColor

func (Theme) StringColor

func (t Theme) StringColor(rgbColors RGBColor, input string) termenv.Style

Jump to

Keyboard shortcuts

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