Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPrimary = "himagenta" DefaultSecondary = "hiblack" DefaultOptimal = "higreen" DefaultError = "hired" DefaultWarning = "hiyellow" DefaultFrozen = "hiblue" )
The color names as string, usable in configuration files.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorPalette ¶
type ColorPalette struct { Primary color.Attribute Secondary color.Attribute Optimal color.Attribute Error color.Attribute Warning color.Attribute Frozen color.Attribute Bold color.Attribute }
ColorPalette declares the color (as C) to use for each role.
func DefaultColorPalette ¶
func DefaultColorPalette() *ColorPalette
func New ¶
func New(m StringPalette) *ColorPalette
New returns a color palette (as C) from a string color palette (as read by viper).
type ColorPaletteFunc ¶
type ColorPaletteFunc struct { Primary func(a ...any) string Secondary func(a ...any) string Optimal func(a ...any) string Error func(a ...any) string Warning func(a ...any) string Frozen func(a ...any) string Bold func(a ...any) string }
ColorPaletteFunc declares the string colorizer to use for each role.
func DefaultFuncPalette ¶
func DefaultFuncPalette() *ColorPaletteFunc
func NewFunc ¶
func NewFunc(m StringPalette) *ColorPaletteFunc
NewFunc returns a color palette (as string colorizer func) from a string color palette (as read by viper).
type StringPalette ¶
type StringPalette struct { Primary string Secondary string Optimal string Error string Warning string Frozen string }
StringPalette declares the color (as string) to use for each role.
func DefaultPalette ¶
func DefaultPalette() *StringPalette
Click to show internal directories.
Click to hide internal directories.