Skip to content

Latest commit

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

golor

golor is a terminal color package for Go, supporting both 16-colors mode and 256 colors mode.

Example usage

16-bit color printing:

// See examples/colors.gofmt.Println(golor.Colorize("Green foreground", golor.G, -1))
fmt.Println(golor.Colorize("Cyan background", -1, golor.CYAN))

256-color printing:

// See examples/colors.goindex:=42// index can vary from 0 to 255fmt.Println(golor.Colorize("Foreground", index, -1))

Consistently assigning unique colors to strings:

// See examples/unique.goname:="srid"fmt.Println(golor.Colorize(process, golor.AssignColor(name), -1))

About

Go terminal color package (256 colors)

Resources

Stars

17 stars

Watchers

46 watching

Forks

Releases

Packages

Contributors

Languages