colorman

package
v0.0.0-...-8c7e409 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RESET       ColorValue = "\x1b[0m"
	COL_GREY    ColorValue = ColorGetter(BLACK, REGULAR)
	COL_GREEN              = ColorGetter(GREEN, REGULAR)
	COL_RED                = ColorGetter(RED, REGULAR)
	COL_RED_BB             = ColorGetter(RED, BRIGHT_BACKGROUND)
	COL_BLUE_B             = ColorGetter(BLUE, BACKGROUND)
	COL_BLUE_U             = ColorGetter(BLUE, UNDERLINE)
	COL_GREEN_B            = ColorGetter(GREEN, BACKGROUND)
	COL_CYAN               = ColorGetter(CYAN, REGULAR)
)

Functions

func AddColors

func AddColors(col ColorValue, str string) string

func AppendColor

func AppendColor(str string, col ColorValue) string

func IsColorized

func IsColorized(word string) bool

Types

type ColorStruct

type ColorStruct struct {
	// contains filtered or unexported fields
}

func (*ColorStruct) GetValue

func (s *ColorStruct) GetValue() ColorValue

type ColorType

type ColorType int
const (
	BLACK ColorType = iota
	RED
	GREEN
	YELLOW
	BLUE
	PURPLE
	CYAN
	WHITE

	DEFAULT
)

type ColorValue

type ColorValue string

func ColorGetter

func ColorGetter(col ColorType, font FontType) ColorValue

type FontType

type FontType int
const (
	REGULAR FontType = iota
	UNDERLINE
	BACKGROUND
	BRIGHT_BACKGROUND
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL