Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daviddengcn/Go-colortext
Change the color of console text.
https://github.com/daviddengcn/Go-colortext
Last synced: 20 days 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 12 years ago)
- Default Branch: master
- Last Pushed: 2020-03-29T21:12:20.000Z (over 4 years ago)
- Last Synced: 2024-07-31T01:22:58.426Z (4 months 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
README
go-colortext package [![GoSearch](http://go-search.org/badge?id=github.com%2Fdaviddengcn%2Fgo-colortext)](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