Documentation
¶
Index ¶
- Constants
- func Blue(a interface{}, w ...interface{}) string
- func ColorWithName(color string, a interface{}, w ...interface{}) string
- func Colorize(color string, v interface{}, w ...interface{}) string
- func CornSilk(a interface{}, w ...interface{}) string
- func Cyan(a interface{}, w ...interface{}) string
- func DarkMagenta(a interface{}, w ...interface{}) string
- func DarkOrange(a interface{}, w ...interface{}) string
- func DeepPink(a interface{}, w ...interface{}) string
- func Default(a interface{}, w ...interface{}) string
- func DefaultBackgroundColor() string
- func DefaultFlags() string
- func DefaultForegroundColor() string
- func DefaultWidth() int
- func FloatPrecision() int
- func GoldenRod(a interface{}, w ...interface{}) string
- func Green(a interface{}, w ...interface{}) string
- func Lavender(a interface{}, w ...interface{}) string
- func LightBlue(a interface{}, w ...interface{}) string
- func LightCoral(a interface{}, w ...interface{}) string
- func LightCyan(a interface{}, w ...interface{}) string
- func LightGreen(a interface{}, w ...interface{}) string
- func LightSalmon(a interface{}, w ...interface{}) string
- func LightSkyBlue(a interface{}, w ...interface{}) string
- func LightYellow(a interface{}, w ...interface{}) string
- func MediumBlue(a interface{}, w ...interface{}) string
- func MediumSpringGreen(a interface{}, w ...interface{}) string
- func MistyRose(a interface{}, w ...interface{}) string
- func Orange(a interface{}, w ...interface{}) string
- func Red(a interface{}, w ...interface{}) string
- func SetDefault(foreground, background string, width, precision int, flags string)
- func SetDefaultBackgroundColor(color string)
- func SetDefaultFlags(f string)
- func SetDefaultForegroundColor(color string)
- func SetDefaultWidth(w int)
- func SetFloatPrecision(w int)
- func SkyBlue(a interface{}, w ...interface{}) string
- func Teal(a interface{}, w ...interface{}) string
- func Wheat(a interface{}, w ...interface{}) string
- func Yellow(a interface{}, w ...interface{}) string
- func YellowGreen(a interface{}, w ...interface{}) string
Constants ¶
const ( NoColor = "" DefaultColor = "white" YellowColor = "yellow" GreenColor = "green" GoldenRodColor = "goldenrod" OrangeColor = "orange" TealColor = "teal" CornSilkColor = "cornsilk" DeepPinkColor = "deeppink" RedColor = "red" BlueColor = "blue" LightBlueColor = "lightblue" LightCoralColor = "lightcoral" LightCyanColor = "lightcyan" LavenderColor = "lavender" LightSalmonColor = "lightsalmon" MediumBlueColor = "mediumblue" MistyRoseColor = "mistyrose" SkyBlueColor = "skyblue" LightSkyBlueColor = "lightskyblue" MediumSpringGreenColor = "mediumspringgreen" WheatColor = "wheat" YellowGreenColor = "yellowgreen" LightYellowColor = "lightyellow" DarkOrangeColor = "darkorange" LightGreenColor = "lightgreen" DarkMagentaColor = "darkmagenta" CyanColor = "aqua" )
Color constant names we can use
Variables ¶
This section is empty.
Functions ¶
func Blue ¶
func Blue(a interface{}, w ...interface{}) string
Blue - return string based on the color given
func ColorWithName ¶
ColorWithName - Find and set the color by name
func Colorize ¶
Colorize - Add color to the value passed, w size can be 0, 1 or 2
w[0] is the width and w[1] is precision or a float value if present, left alignment use negative w[1] is not present then use default colorInfo.floatPrecision w[2] is the foreground color w[3] is the background color w[4] is the attribute of the color
func CornSilk ¶
func CornSilk(a interface{}, w ...interface{}) string
CornSilk - return string based on the color given
func Cyan ¶
func Cyan(a interface{}, w ...interface{}) string
Cyan - return string based on the color given
func DarkMagenta ¶
func DarkMagenta(a interface{}, w ...interface{}) string
DarkMagenta - return string based on the color given
func DarkOrange ¶
func DarkOrange(a interface{}, w ...interface{}) string
DarkOrange - return string based on the color given
func DeepPink ¶
func DeepPink(a interface{}, w ...interface{}) string
DeepPink - return string based on the color given
func Default ¶
func Default(a interface{}, w ...interface{}) string
Default - The default color for the text
func DefaultBackgroundColor ¶
func DefaultBackgroundColor() string
DefaultBackgroundColor returns the default color
func DefaultForegroundColor ¶
func DefaultForegroundColor() string
DefaultForegroundColor returns the default color
func GoldenRod ¶
func GoldenRod(a interface{}, w ...interface{}) string
GoldenRod - return string based on the color given
func Green ¶
func Green(a interface{}, w ...interface{}) string
Green - return string based on the color given
func Lavender ¶
func Lavender(a interface{}, w ...interface{}) string
Lavender - return string based on the color given
func LightBlue ¶
func LightBlue(a interface{}, w ...interface{}) string
LightBlue - return string based on the color given
func LightCoral ¶
func LightCoral(a interface{}, w ...interface{}) string
LightCoral - return string based on the color given
func LightCyan ¶
func LightCyan(a interface{}, w ...interface{}) string
LightCyan - return string based on the color given
func LightGreen ¶
func LightGreen(a interface{}, w ...interface{}) string
LightGreen - return string based on the color given
func LightSalmon ¶
func LightSalmon(a interface{}, w ...interface{}) string
LightSalmon - return string based on the color given
func LightSkyBlue ¶
func LightSkyBlue(a interface{}, w ...interface{}) string
LightSkyBlue - return string based on the color given
func LightYellow ¶
func LightYellow(a interface{}, w ...interface{}) string
LightYellow - return string based on the color given
func MediumBlue ¶
func MediumBlue(a interface{}, w ...interface{}) string
MediumBlue - return string based on the color given
func MediumSpringGreen ¶
func MediumSpringGreen(a interface{}, w ...interface{}) string
MediumSpringGreen - return string based on the color given
func MistyRose ¶
func MistyRose(a interface{}, w ...interface{}) string
MistyRose - return string based on the color given
func Orange ¶
func Orange(a interface{}, w ...interface{}) string
Orange - return string based on the color given
func Red ¶
func Red(a interface{}, w ...interface{}) string
Red - return string based on the color given
func SetDefault ¶
SetDefault - create a colorize instance
func SetDefaultBackgroundColor ¶
func SetDefaultBackgroundColor(color string)
SetDefaultBackgroundColor - Set the default background color
func SetDefaultForegroundColor ¶
func SetDefaultForegroundColor(color string)
SetDefaultForegroundColor - Set the default foreground color
func SkyBlue ¶
func SkyBlue(a interface{}, w ...interface{}) string
SkyBlue - return string based on the color given
func Teal ¶
func Teal(a interface{}, w ...interface{}) string
Teal - return string based on the color given
func Wheat ¶
func Wheat(a interface{}, w ...interface{}) string
Wheat - return string based on the color given
func Yellow ¶
func Yellow(a interface{}, w ...interface{}) string
Yellow - return string based on the color given
func YellowGreen ¶
func YellowGreen(a interface{}, w ...interface{}) string
YellowGreen - return string based on the color given
Types ¶
This section is empty.