Skip to content
/ color Public

Go package containing color constants for ANSI terminals

License

Notifications You must be signed in to change notification settings

lxma/color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

color

Go package containing color constants for ANSI terminals.

Intention

The idea is to provide constants that can be used for simple color commands. Colors are simple string constants that can be included in printf commands, such as:

    fmt.Printf("Normal text – %sthis is green%s this is bold and green%s and this is regular again.\n",
               color.Green, color.Bold, color.Reset)

You can also combine instructions such as:

const ErrorColor = color.Red + color.Bold
fmt.Printf("%sThis is wrong\n%s", ErrorColor, color.Reset)

There is intentionally no code such as functions to print something in a specific color. If you are looking for something like that, look into fatih/color.

About

Go package containing color constants for ANSI terminals

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages