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: 3 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 12 years ago)
- Default Branch: master
- Last Pushed: 2020-03-29T21:12:20.000Z (almost 5 years ago)
- Last Synced: 2024-10-25T04:09:43.286Z (3 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
- awesome-go - go-colortext - Go library for color output in terminals. (Command Line / Advanced Console UIs)
- fucking-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 - 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-extra - go-colortext - 01-23T03:38:54Z|2020-03-29T21:12:20Z| (Build Automation / Advanced Console UIs)
- awesome-go-with-stars - 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-plus - go-colortext - Go library for color output in terminals. ![stars](https://img.shields.io/badge/stars-216-blue) (Command Line / Advanced Console UIs)
- awesome-go-plus - go-colortext - Go library for color output in terminals. ![stars](https://img.shields.io/badge/stars-214-blue) (Command Line / Advanced Console UIs)
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