https://github.com/d5/cc
Terminal output coloring for Go CLI apps
https://github.com/d5/cc
Last synced: 4 months ago
JSON representation
Terminal output coloring for Go CLI apps
- Host: GitHub
- URL: https://github.com/d5/cc
- Owner: d5
- Created: 2016-01-16T06:43:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-07-06T06:53:26.000Z (almost 7 years ago)
- Last Synced: 2025-08-29T06:23:16.551Z (10 months ago)
- Language: Go
- Homepage: https://godoc.org/github.com/d5/cc
- Size: 31.3 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cc
[](https://godoc.org/github.com/d5/cc)
Colorize terminal output.
```golang
package main
import (
"log"
"github.com/d5/cc"
)
func main() {
log.Printf("Enabled: %v", cc.Enabled())
log.Printf(cc.Red("red") + " and " + cc.Blue("blue"))
log.Printf("%s - %s", cc.BgWhite(cc.Blue("foo")), cc.BgRed(cc.Yellow("bar")))
log.Printf(cc.Underline(cc.Bold("bold-underline")))
}
```

## Features
- Clean and simple API
- Windows support
- Auto-detect coloring support
## Install
```bash
go get github.com/d5/cc
```