Documentation ¶
Overview ¶
256 color terminal printing in Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MIN, MAX int
View Source
var R, G, C, M, Y, W int
View Source
var RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, BLACK, WHITE, GRAY int
16-colors
Functions ¶
func AssignColor ¶
Types ¶
type Legacy ¶
type Legacy struct { }
Legacy terminal supporting only 16 colors.
func (*Legacy) AssignColor ¶
type Terminal ¶
type Terminal interface { // RGB returns the color code corresponding a RGB value set. RGB(red, green, blue int) int Colorize(s string, fg int, bg int) string // Assign and return an unique color for this string. Automatically // avoid black/white colors. AssignColor(s string) int }
var TERM Terminal
Click to show internal directories.
Click to hide internal directories.