Documentation ¶
Index ¶
- Variables
- type Color
- type Decoration
- type Sprinter
- type TextStyle
- func (b TextStyle) SetBg(color Color) TextStyle
- func (b TextStyle) SetBold() TextStyle
- func (b TextStyle) SetFg(color Color) TextStyle
- func (b TextStyle) SetItalic() TextStyle
- func (b TextStyle) SetReverse() TextStyle
- func (b TextStyle) SetUnderscore() TextStyle
- func (b TextStyle) Sprint(a ...interface{}) string
- func (b TextStyle) Sprintf(format string, a ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorMap = map[string]struct { Foreground color.Color Background color.Color }{ "default": {color.FgWhite, color.BgBlack}, "black": {color.FgBlack, color.BgBlack}, "red": {color.FgRed, color.BgRed}, "green": {color.FgGreen, color.BgGreen}, "yellow": {color.FgYellow, color.BgYellow}, "blue": {color.FgBlue, color.BgBlue}, "magenta": {color.FgMagenta, color.BgMagenta}, "cyan": {color.FgCyan, color.BgCyan}, "white": {color.FgWhite, color.BgWhite}, }
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
func NewBasicColor ¶
func NewRGBColor ¶
type Decoration ¶
type Decoration struct {
// contains filtered or unexported fields
}
func (*Decoration) SetBold ¶
func (d *Decoration) SetBold()
func (*Decoration) SetItalic ¶
func (d *Decoration) SetItalic()
func (*Decoration) SetReverse ¶
func (d *Decoration) SetReverse()
func (*Decoration) SetUnderscore ¶
func (d *Decoration) SetUnderscore()
func (Decoration) ToOpts ¶
func (d Decoration) ToOpts() color.Opts
type TextStyle ¶
type TextStyle struct {
// contains filtered or unexported fields
}
func FromBasicBg ¶
func FromBasicFg ¶
func FromStyleConfig ¶
func FromStyleConfig(styleConfig *config.StyleConfig) TextStyle
func (TextStyle) SetReverse ¶
func (TextStyle) SetUnderscore ¶
Click to show internal directories.
Click to hide internal directories.