created by Austin Poor
A tiny go package for printing colorful text to the terminal.
Functions wrap fmt.Print
and fmt.Println
for the following colors:
- Red
- Green
- Yellow
- Blue
- Purple
- Cyan
- Gray
- Grey (alias of Gray)
- White
package main
import "github.com/a-poor/golors"
func main() {
// Print red text and a new-line character
golors.Redln("This text is red!")
// These three commands print a single line "whitecyanpurple"
// but where each word is the correct color
golors.White("white")
golors.Cyan("cyan")
golors.Purpleln("purple")
}
And the result is:
Include more colors, background colors, and text styles (ie bold, faint, italics, and underlined)