Xterm256 aims to be a Go package for printing colored string in a 256 colors terminal.
go get github.com/gilliek/go-xterm256/xterm256
// Use a predefined color
xterm256.Println(xterm256.Red, "Foo")
// Define a new color
orange, _ := xterm256.NewColor(3, 1, 0)
xterm256.Println(orange, "Bar")
// Add a background color
orange.SetBackground(5, 5, 5)
xterm256.Println(orange, "Bar")
Documentation can be found on either GoDoc or GoWalker.
You're very welcome to submit pull requests or report bugs :)
BSD 3-clauses