Documentation ¶
Index ¶
Constants ¶
View Source
const ( NormalIntensityForeground = 30 HighIntensityForeground = 90 NormalIntensityBackground = 40 HighIntensityBackground = 100 )
View Source
const Escape = "\033"
Variables ¶
This section is empty.
Functions ¶
func WithColor ¶
func WithColor(text string, format Format, foreground Foreground, background Background, params ...interface{}) string
Types ¶
type Background ¶
type Background int
const ( // background text colors BackgroundBlack Background = iota + NormalIntensityBackground BackgroundRed BackgroundGreen BackgroundYellow BackgroundBlue BackgroundMagenta BackgroundCyan BackgroundWhite )
const ( // background hi-intensity text colors BackgroundHiBlack Background = iota + HighIntensityBackground BackgroundHiRed BackgroundHiGreen BackgroundHiYellow BackgroundHiBlue BackgroundHiMagenta BackgroundHiCyan BackgroundHiWhite )
type Foreground ¶
type Foreground int
const ( // foreground text colors ForegroundBlack Foreground = iota + NormalIntensityForeground ForegroundRed ForegroundGreen ForegroundYellow ForegroundBlue ForegroundMagenta ForegroundCyan ForegroundWhite )
const ( // foreground hi-intensity text colors ForegroundHiBlack Foreground = iota + HighIntensityForeground ForegroundHiRed ForegroundHiGreen ForegroundHiYellow ForegroundHiBlue ForegroundHiMagenta ForegroundHiCyan ForegroundHiWhite )
Click to show internal directories.
Click to hide internal directories.