Documentation ¶
Index ¶
- Constants
- func AnsiEscape(escapeCode uint8) colorAttribute
- func BgColor256(color256 uint8) colorAttribute
- func BgHSV(hue float64, saturation float64, value float64) colorAttribute
- func BgRGB(red uint8, green uint8, blue uint8) colorAttribute
- func FgColor256(color256 uint8) colorAttribute
- func FgHSV(hue float64, saturation float64, value float64) colorAttribute
- func FgRGB(red uint8, green uint8, blue uint8) colorAttribute
- type ColorAttributes
- func (c *ColorAttributes) Add(attributes ...colorAttribute) *ColorAttributes
- func (c *ColorAttributes) AddComplementary() *ColorAttributes
- func (c *ColorAttributes) Println(text string)
- func (c *ColorAttributes) SetDistance(distance int) *ColorAttributes
- func (c *ColorAttributes) SetFallback(colors map[int]colorful.Color) *ColorAttributes
- func (c *ColorAttributes) SetFallbackFromPath(filePath string) *ColorAttributes
- func (c *ColorAttributes) SetFlag(flag int) *ColorAttributes
Constants ¶
View Source
const ( TrueColor = iota Color256 Ansi NoColor Auto )
View Source
const ( Reset = 0 Bold = 1 Dim = 2 Italic = 3 Underline = 4 Reverse = 7 FgBlack = 30 FgRed = 31 FgGreen = 32 FgYellow = 33 FgBlue = 34 FgMagenta = 35 FgCyan = 36 FgWhite = 37 BgBlack = 40 BgRed = 41 BgGreen = 42 BgYellow = 43 BgBlue = 44 BgMagenta = 45 BgCyan = 46 BgWhite = 47 FgBrightBlack = 90 FgBrightRed = 91 FgBrightGreen = 92 FgBrightYellow = 93 FgBrightBlue = 94 FgBrightMagenta = 95 FgBrightCyan = 96 FgBrightWhite = 97 BgBrightBlack = 100 BgBrightRed = 101 BgBrightGreen = 102 BgBrightYellow = 103 BgBrightBlue = 104 BgBrightMagenta = 105 BgBrightCyan = 106 BgBrightWhite = 107 )
View Source
const ( TERM = "TERM" NO_COLOR = "NO_COLOR" COLOR_TERM = "COLORTERM" )
View Source
const ( Kitty = iota Alacritty Default )
View Source
const ( DistanceRgb = iota DistanceLab DistanceLuv DistanceCIE94 DistanceCIEDE2000 )
Variables ¶
This section is empty.
Functions ¶
func AnsiEscape ¶
func AnsiEscape(escapeCode uint8) colorAttribute
func BgColor256 ¶
func BgColor256(color256 uint8) colorAttribute
func FgColor256 ¶
func FgColor256(color256 uint8) colorAttribute
Types ¶
type ColorAttributes ¶
type ColorAttributes struct {
// contains filtered or unexported fields
}
func New ¶
func New(attributes ...colorAttribute) *ColorAttributes
func (*ColorAttributes) Add ¶
func (c *ColorAttributes) Add(attributes ...colorAttribute) *ColorAttributes
func (*ColorAttributes) AddComplementary ¶
func (c *ColorAttributes) AddComplementary() *ColorAttributes
func (*ColorAttributes) Println ¶
func (c *ColorAttributes) Println(text string)
func (*ColorAttributes) SetDistance ¶
func (c *ColorAttributes) SetDistance(distance int) *ColorAttributes
func (*ColorAttributes) SetFallback ¶
func (c *ColorAttributes) SetFallback(colors map[int]colorful.Color) *ColorAttributes
func (*ColorAttributes) SetFallbackFromPath ¶
func (c *ColorAttributes) SetFallbackFromPath(filePath string) *ColorAttributes
func (*ColorAttributes) SetFlag ¶
func (c *ColorAttributes) SetFlag(flag int) *ColorAttributes
Click to show internal directories.
Click to hide internal directories.