xcolors

package
Version: v0.0.0-...-796497b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FOREGROUND    = "\033[38;5;"
	FOREGROUNDEND = "m"
	BACKGROUND    = "\033[48;5;"
	BACKGROUNDEND = "m"
	ALPHA         = uint8(255)
	ESCAPE        = "\x1b"
	RESET         = "\033[0m"
	CLEAR         = "\033[2J"
	ANSIClear     = "\033[0m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorNumber

type ColorNumber int
const (
	RED         ColorNumber = 0
	BLUE        ColorNumber = 1
	GREEN       ColorNumber = 2
	BLACK       ColorNumber = 3
	WHITE       ColorNumber = 4
	LIGHTRED    ColorNumber = 5
	DARKRED     ColorNumber = 6
	LIGHTBLUE   ColorNumber = 7
	DARKBLUE    ColorNumber = 8
	LIGHTGREEN  ColorNumber = 9
	DARKGREEN   ColorNumber = 10
	LIGHTYELLOW ColorNumber = 11
	YELLOW      ColorNumber = 12
	DARKYELLOW  ColorNumber = 13
	LIGHTORANGE ColorNumber = 14
	ORANGE      ColorNumber = 15
	DARKORANGE  ColorNumber = 16
	LIGHTPINK   ColorNumber = 17
	PINK        ColorNumber = 18
	DARKPINK    ColorNumber = 19
	LIGHTGREY   ColorNumber = 20
	GREY        ColorNumber = 21
	DARKGREY    ColorNumber = 22
	YAHOO       ColorNumber = 23
)

func (*ColorNumber) Color

func (c *ColorNumber) Color() color.RGBA

type Colors

type Colors struct {
	Color map[string]ColorNumber
	// contains filtered or unexported fields
}

func New

func New() *Colors

func (*Colors) BGColor

func (c *Colors) BGColor(col color.Color) *Colors

func (*Colors) BGColorText

func (c *Colors) BGColorText(col color.Color, text string) *Colors

func (*Colors) Back

func (c *Colors) Back(a ColorNumber) *Colors

func (*Colors) Background

func (c *Colors) Background(a ColorNumber) *Colors

func (*Colors) Blinking

func (c *Colors) Blinking() *Colors

func (*Colors) BlinkingText

func (c *Colors) BlinkingText(text string) *Colors

func (*Colors) Bold

func (c *Colors) Bold() *Colors

func (*Colors) BoldText

func (c *Colors) BoldText(text string) *Colors

func (*Colors) ClearScreen

func (c *Colors) ClearScreen()

func (*Colors) FGColor

func (c *Colors) FGColor(col color.Color) *Colors

func (*Colors) FGColorText

func (c *Colors) FGColorText(col color.Color, text string) *Colors

func (*Colors) Fore

func (c *Colors) Fore(a ColorNumber) *Colors

func (*Colors) Foreground

func (c *Colors) Foreground(a ColorNumber) *Colors

func (*Colors) Inverse

func (c *Colors) Inverse() *Colors

func (*Colors) InverseText

func (c *Colors) InverseText(text string) *Colors

func (*Colors) Italic

func (c *Colors) Italic() *Colors

func (*Colors) ItalicText

func (c *Colors) ItalicText(text string) *Colors

func (*Colors) NewString

func (c *Colors) NewString() *Colors

func (*Colors) Plain

func (c *Colors) Plain() *Colors

func (*Colors) PlainText

func (c *Colors) PlainText(text string) *Colors

func (*Colors) Reset

func (c *Colors) Reset() *Colors

func (*Colors) Strike

func (c *Colors) Strike() *Colors

func (*Colors) StrikeText

func (c *Colors) StrikeText(text string) *Colors

func (*Colors) String

func (c *Colors) String() string

func (*Colors) Text

func (c *Colors) Text(text string) *Colors

func (*Colors) Underline

func (c *Colors) Underline() *Colors

func (*Colors) UnderlineText

func (c *Colors) UnderlineText(text string) *Colors

Source Files

Jump to

Keyboard shortcuts

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