Documentation
¶
Index ¶
- Constants
- Variables
- func Colorize(s string, color Color) string
- type Color
- func (c Color) Background(standardColor byte) Color
- func (c Color) BackgroundGray(x byte) Color
- func (c Color) BackgroundRGB(r, g, b byte) Color
- func (c Color) Bold() Color
- func (c Color) Faint() Color
- func (c Color) Foreground(standardColor byte) Color
- func (c Color) ForegroundGray(x byte) Color
- func (c Color) ForegroundRGB(r, g, b byte) Color
- func (c Color) Italic() Color
- func (c Color) Negative() Color
- func (c Color) String() string
- func (c Color) Underline() Color
Constants ¶
View Source
const ( Black byte = iota Red Green Yellow Blue Magenta Cyan White BrightBlack BrightRed BrightGreen BrightYellow BrightBlue BrightMagenta BrightCyan BrightWhite )
Variables ¶
View Source
var ColorOn = terminal.IsTerminal(int(os.Stdout.Fd()))
ColorOn enables colorization.
Functions ¶
Types ¶
type Color ¶
type Color string
const Reset Color = "0"
func (Color) Background ¶
func (Color) BackgroundGray ¶
func (Color) BackgroundRGB ¶
func (Color) Foreground ¶
func (Color) ForegroundGray ¶
func (Color) ForegroundRGB ¶
Click to show internal directories.
Click to hide internal directories.