Documentation
¶
Overview ¶
Code generated by scripts/color_gen.py. DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableConsole ¶
func EnableConsole() error
EnableConsole enables color printing on Windows and is a no-op on non-Windows platforms (they enable color printing by default).
Types ¶
type Color ¶
type Color struct {
// BgBlack - Applies non-bold/bright black to background
BgBlack Code
// BgBlackBright - Applies bold/bright black to background
BgBlackBright Code
// BgBlue - Applies non-bold/bright blue to background
BgBlue Code
// BgBlueBright - Applies bold/bright blue to background
BgBlueBright Code
// BgCyan - Applies non-bold/bright cyan to background
BgCyan Code
// BgCyanBright - Applies bold/bright cyan to background
BgCyanBright Code
// BgDefault - Applies only the background portion of the defaults (see 0)
BgDefault Code
// BgExtended - Applies extended color value to the background (see details below)
BgExtended Code
// BgGreen - Applies non-bold/bright green to background
BgGreen Code
// BgGreenBright - Applies bold/bright green to background
BgGreenBright Code
// BgMagenta - Applies non-bold/bright magenta to background
BgMagenta Code
// BgMagentaBright - Applies bold/bright magenta to background
BgMagentaBright Code
// BgRed - Applies non-bold/bright red to background
BgRed Code
// BgRedBright - Applies bold/bright red to background
BgRedBright Code
// BgWhite - Applies non-bold/bright white to background
BgWhite Code
// BgWhiteBright - Applies bold/bright white to background
BgWhiteBright Code
// BgYellow - Applies non-bold/bright yellow to background
BgYellow Code
// BgYellowBright - Applies bold/bright yellow to background
BgYellowBright Code
// Bold - Applies brightness/intensity flag to foreground color
Bold Code
// Default - Returns all attributes to the default state prior to modification
Default Code
// FgBlack - Applies non-bold/bright black to foreground
FgBlack Code
// FgBlackBright - Applies bold/bright black to foreground
FgBlackBright Code
// FgBlue - Applies non-bold/bright blue to foreground
FgBlue Code
// FgBlueBright - Applies bold/bright blue to foreground
FgBlueBright Code
// FgCyan - Applies non-bold/bright cyan to foreground
FgCyan Code
// FgCyanBright - Applies bold/bright cyan to foreground
FgCyanBright Code
// FgDefault - Applies only the foreground portion of the defaults (see 0)
FgDefault Code
// FgExtended - Applies extended color value to the foreground (see details below)
FgExtended Code
// FgGreen - Applies non-bold/bright green to foreground
FgGreen Code
// FgGreenBright - Applies bold/bright green to foreground
FgGreenBright Code
// FgMagenta - Applies non-bold/bright magenta to foreground
FgMagenta Code
// FgMagentaBright - Applies bold/bright magenta to foreground
FgMagentaBright Code
// FgRed - Applies non-bold/bright red to foreground
FgRed Code
// FgRedBright - Applies bold/bright red to foreground
FgRedBright Code
// FgWhite - Applies non-bold/bright white to foreground
FgWhite Code
// FgWhiteBright - Applies bold/bright white to foreground
FgWhiteBright Code
// FgYellow - Applies non-bold/bright yellow to foreground
FgYellow Code
// FgYellowBright - Applies bold/bright yellow to foreground
FgYellowBright Code
// Negative - Swaps foreground and background colors
Negative Code
// Nobold - Removes brightness/intensity flag from foreground color
Nobold Code
// Nounderline - Removes underline
Nounderline Code
// Positive - Returns foreground/background to normal
Positive Code
// Underline - Adds underline
Underline Code
}
Color contains all colors listed in https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences?redirectedfrom=MSDN#text-formatting
func Prepare ¶
Prepare is a convenience method that calls EnableConsole and returns an enabled color if there's no error and startEnabled is True, and a disabled color and the error otherwise.
func (*Color) DisableAll ¶ added in v0.0.2
func (c *Color) DisableAll()
DisableAll sets all colors to the empty string, effectively disabling color output
