Golang Coloring Cli Output.
$ go get github.com/Jexulie/Niji
// import package
import niji "github.com/Jexulie/Niji"
func main() {
/* Standart colors
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White
*/
// returns string
str := niji.FormatGreen("Cow")
// prints
niji.PrintMagenta("Powerpuff Girls...")
/* Custom Colors */
// for HEX
blue := niji.HEX("#4D9FF7")
// or as short form #49F
niji.PrintCustomHEXln(blue, "Sky")
// for RGB
red := niji.RGB{R: 255, G: 0, B: 0}
niji.PrintCustomRGBln(red, "Rawrr!")
}
- Program works in Bash, ConEmu & Git-Bash But Not in Powershell and Command Prompt
- Support for Powershell and Command Prompt.
- Support for Background Coloring.
- Support for other stylings e.g. Underline, Italic, Bold, Strikethrough.