Documentation ¶
Index ¶
- Variables
- func BgBytes(in []byte, r, g, b uint8) []byte
- func BgString(in string, r, g, b uint8) string
- func Black(str string) string
- func BlackBG(str string) string
- func Bold(str string) string
- func CC(elems ...string) string
- func Colorize(str string) string
- func ColorizeBG(str string) string
- func FgBytes(in []byte, r, g, b uint8) []byte
- func FgString(in string, r, g, b uint8) string
- func HashString(s string) uint64
- func HighlightAnyCase(str, substr string, colorer func(string) string) string
- func HighlightLimeBG(str, substr string) string
- func HighlightRedBG(str, substr string) string
- func Indigo(str string) string
- func IndigoBG(str string) string
- func IsLight(rr, gg, bb uint64) bool
- func Lime(str string) string
- func LimeBG(str string) string
- func Ln(a ...interface{}) string
- func Lnsf(format string, a ...interface{}) string
- func LnsfI(indent int, format string, a ...interface{}) string
- func Orange(str string) string
- func OrangeBG(str string) string
- func Purple(str string) string
- func PurpleBG(str string) string
- func Red(str string) string
- func RedBG(str string) string
- func S(a ...interface{}) string
- func Sf(format string, a ...interface{}) string
- func Shakespeare(str string) string
- func ShakespeareBG(str string) string
- func StringToColor(str string) func(string) string
- func StringToColorBG(str string) func(string) string
- func White(str string) string
- func WhiteBG(str string) string
- func Yellow(str string) string
- func YellowBG(str string) string
- type Encoder
- type Option
- type TextEncodable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EncoderColorCyan = color.New(color.FgCyan) EncoderColorYellow = color.New(color.FgYellow) EncoderColorGreen = color.New(color.FgGreen) EncoderColorWhite = color.New(color.FgWhite) )
View Source
var DisableColors = false
Functions ¶
func BgBytes ¶
BgBytes colorizes the background of the input with the terminal color that matches the closest the RGB color.
func BgString ¶
BgString colorizes the background of the input with the terminal color that matches the closest the RGB color.
This is simply a helper for Bytes.
func ColorizeBG ¶
func FgBytes ¶
Bytes colorizes the foreground with the terminal color that matches the closest the RGB color.
func FgString ¶
FgString colorizes the foreground of the input with the terminal color that matches the closest the RGB color.
This is simply a helper for Bytes.
func HashString ¶
func HighlightAnyCase ¶
func HighlightLimeBG ¶
func HighlightRedBG ¶
func ShakespeareBG ¶
func StringToColor ¶
func StringToColorBG ¶
Types ¶
type TextEncodable ¶
Click to show internal directories.
Click to hide internal directories.