package color

import "github.com/labstack/gommon/color"

Index

Constants

const (
	// Blk Black text style
	Blk = "30"
	// Rd red text style
	Rd = "31"
	// Grn green text style
	Grn = "32"
	// Yel yellow text style
	Yel = "33"
	// Blu blue text style
	Blu = "34"
	// Mgn magenta text style
	Mgn = "35"
	// Cyn cyan text style
	Cyn = "36"
	// Wht white text style
	Wht = "37"
	// Gry grey text style
	Gry = "90"

	// BlkBg black background style
	BlkBg = "40"
	// RdBg red background style
	RdBg = "41"
	// GrnBg green background style
	GrnBg = "42"
	// YelBg yellow background style
	YelBg = "43"
	// BluBg blue background style
	BluBg = "44"
	// MgnBg magenta background style
	MgnBg = "45"
	// CynBg cyan background style
	CynBg = "46"
	// WhtBg white background style
	WhtBg = "47"

	// R reset emphasis style
	R = "0"
	// B bold emphasis style
	B = "1"
	// D dim emphasis style
	D = "2"
	// I italic emphasis style
	I = "3"
	// U underline emphasis style
	U = "4"
	// In inverse emphasis style
	In = "7"
	// Hd hidden emphasis style
	Hd = "8"
	// So strikeout emphasis style
	So = "9"
)

Color styles

Variables

var (
	// Text color
	Black   = outer(Blk)
	Red     = outer(Rd)
	Green   = outer(Grn)
	Yellow  = outer(Yel)
	Blue    = outer(Blu)
	Magenta = outer(Mgn)
	Cyan    = outer(Cyn)
	White   = outer(Wht)
	Grey    = outer(Gry)

	// Background color
	BlackBg   = outer(BlkBg)
	RedBg     = outer(RdBg)
	GreenBg   = outer(GrnBg)
	YellowBg  = outer(YelBg)
	BlueBg    = outer(BluBg)
	MagentaBg = outer(MgnBg)
	CyanBg    = outer(CynBg)
	WhiteBg   = outer(WhtBg)

	// Emphasis
	Reset     = outer(R)
	Bold      = outer(B)
	Dim       = outer(D)
	Italic    = outer(I)
	Underline = outer(U)
	Inverse   = outer(In)
	Hidden    = outer(Hd)
	Strikeout = outer(So)
)

Color functions

Source Files

color.go

Version
v0.0.1
Published
Apr 3, 2015
Platform
linux/amd64
Imports
2 packages
Last checked
5 hours ago

Tools for package owners.