Documentation ¶
Overview ¶
Package color provides functionality to displayed colored text on the terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Grey = color.New(color.FgWhite) Red = color.New(color.FgHiRed) DullRed = color.New(color.FgRed) Green = color.New(color.FgHiGreen) Yellow = color.New(color.FgHiYellow) HiBlue = color.New(color.FgHiBlue) Cyan = color.New(color.FgCyan) HiCyan = color.New(color.FgHiCyan) Bold = color.New(color.Bold) Faint = color.New(color.Faint) BoldFgYellow = color.New(color.FgYellow).Add(color.Bold) )
Predefined colors. Refer to https://en.wikipedia.org/wiki/ANSI_escape_code to validate if colors would be visible on white or black screen backgrounds.
Functions ¶
func DisableColorBasedOnEnvVar ¶
func DisableColorBasedOnEnvVar()
DisableColorBasedOnEnvVar determines whether the CLI will produce color output based on the environment variable, COLOR.
func Help ¶
Help colors the string to denote that it's auxiliary helpful information, and returns it.
func HighlightCode ¶
HighlightCode wraps the string with the ` character, colors it to denote it's a code block, and returns it.
func HighlightResource ¶
HighlightResource colors the string to denote it as a resource created by the CLI, and returns it.
func HighlightUserInput ¶
HighlightUserInput colors the string to denote it as an input from standard input, and returns it.
Types ¶
This section is empty.