https://github.com/amulyakashyap09/colors
A small golang utility to print colorful ouput on terminal
https://github.com/amulyakashyap09/colors
blue chalk color color-cli color-picker color-scheme colors golang golang-library golang-package golang-utility green red
Last synced: 3 months ago
JSON representation
A small golang utility to print colorful ouput on terminal
- Host: GitHub
- URL: https://github.com/amulyakashyap09/colors
- Owner: amulyakashyap09
- License: mit
- Created: 2018-06-29T10:29:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-14T07:46:25.000Z (almost 8 years ago)
- Last Synced: 2025-08-15T13:57:01.608Z (10 months ago)
- Topics: blue, chalk, color, color-cli, color-picker, color-scheme, colors, golang, golang-library, golang-package, golang-utility, green, red
- Language: Go
- Size: 8.79 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Colors
> A small golang utility to print colorful output on terminal
## Installation
```
go get -u github.com/amulyakashyap09/colors
import color "github.com/amulyakashyap09/colors"
```
## Usage
```
var message string = "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
#bgColor, fgColor, message
color.Custom("black", "yellow", message)
```
## Documentation
`color.Custom(bgColor, fgColor, message)` | `color.Custom` will print the `message` in colors provided as input
`color.Error(message)` | `color.Error` will print the `error` in red & bold
`color.Panic(message)` | `color.Panic` will print the `error` in red & bold & will **exit** the process
`color.Success(message)` | `color.Success` will print the `message` in green
`color.Info(message)` | `color.Info` will print the `message` in blue
`color.Warn(message)` | `color.Warn` will print the `message` in yellow
`color.Yellow(message)` | `color.Yellow` will print the `message` in yellow
`color.Blue(message)` | `color.Blue` will print the `message` in blue
`color.Green(message)` | `color.Green` will print the `message` in green
`color.Red(message)` | `color.Red` will print the `message` in red
`color.Magenta(message)` | `color.Magenta` will print the `message` in magenta
`color.Cyan(message)` | `color.Cyan` will print the `message` in cyan
`color.White(message)` | `color.White` will print the `message` in white
`color.Black(message)` | `color.Black` will print the `message` in black
## Author
```
Amulya Kashyap
amulyakasyap09@gmail.com
```