https://github.com/daviddengcn/go-colortext
Change the color of console text.
https://github.com/daviddengcn/go-colortext
Last synced: 9 months ago
JSON representation
Change the color of console text.
- Host: GitHub
- URL: https://github.com/daviddengcn/go-colortext
- Owner: daviddengcn
- License: other
- Created: 2013-01-23T03:38:54.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2020-03-29T21:12:20.000Z (over 5 years ago)
- Last Synced: 2024-10-25T04:09:43.286Z (about 1 year ago)
- Language: Go
- Size: 18.6 KB
- Stars: 214
- Watchers: 10
- Forks: 22
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-cn - go-colortext - colortext) [![godoc][D]](https://godoc.org/github.com/daviddengcn/go-colortext) (命令行 / 高级控制台用户界面)
- awesome-go-plus - go-colortext - Go library for color output in terminals.  (Command Line / Advanced Console UIs)
- fucking-awesome-go - :octocat: go-colortext - Go library for color output in terminals. :star: 143 :fork_and_knife: 12 (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Change the color of console text. - ★ 179 (Command Line)
- awesome-go-cn - go-colortext
- fucking-awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - | - | - | (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. - :arrow_down:363 - :star:148 (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go-cn - go-colortext
- awesome-go-extra - go-colortext - 01-23T03:38:54Z|2020-03-29T21:12:20Z| (Build Automation / Advanced Console UIs)
- awesome-go - go-colortext - 一个GO语言库用于终端的颜色输出库。 (<span id="命令行-command-line">命令行 Command Line</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-with-stars - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-Char - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- awesome-go-cn - go-colortext - colortext) [![godoc][D]](https://godoc.org/github.com/daviddengcn/go-colortext) (命令行 / 高级控制台用户界面)
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
README
go-colortext package [](http://go-search.org/view?id=github.com%2Fdaviddengcn%2Fgo-colortext)
====================
This is a package to change the color of the text and background in the console, working both under Windows and other systems.
Under Windows, the console APIs are used. Otherwise, ANSI texts are output.
Docs: http://godoc.org/github.com/daviddengcn/go-colortext ([packages that import ct](http://go-search.org/view?id=github.com%2fdaviddengcn%2fgo-colortext))
Usage:
```go
ct.Foreground(Green, false)
fmt.Println("Green text starts here...")
ct.ChangeColor(Red, true, White, false)
fmt.Println(...)
ct.ResetColor()
```
LICENSE
=======
BSD/MIT license