Skip to content

ebitgo/ConsoleColor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go console text color

Description: This library for windows and Linux console output font color control.

Installation

go get github.com/ebitgo/ConsoleColor

In the Linux environment, call the fatih/color library.

go get github.com/fatih/color

Usage

func Example() {
	ConsoleColor.Print(ConsoleColor.C_RED, "This is a test!\r\n")
	ConsoleColor.Printf(ConsoleColor.C_BLUE, "%s!\r\n", "This is a test!")
	ConsoleColor.Println(ConsoleColor.C_WHITE, "This is a test!")

	ConsoleColor.Println(ConsoleColor.C_BLACK, "This is black")
	ConsoleColor.Println(ConsoleColor.C_RED, "This is red")
	ConsoleColor.Println(ConsoleColor.C_GREEN, "This is green")
	ConsoleColor.Println(ConsoleColor.C_YELLOW, "This is yellow")
	ConsoleColor.Println(ConsoleColor.C_BLUE, "This is blue")
	ConsoleColor.Println(ConsoleColor.C_MAGENTA, "This is megenta")
	ConsoleColor.Println(ConsoleColor.C_CYAN, "This is cyan")
	ConsoleColor.Println(ConsoleColor.C_WHITE, "This is white")
}

About

windows and linux console color output

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages