No description
Find a file
oss-core-libraries-dashboard[bot] 0169d6ea48
[COMPLIANCE] Add Copyright and License Headers (Batch 1 of 1) (#2)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2026-02-20 15:25:59 +05:30
.travis.yml update travis.yml 2014-07-12 19:55:53 -07:00
colorstring.go [COMPLIANCE] Add Copyright and License Headers (Batch 1 of 1) (#2) 2026-02-20 15:25:59 +05:30
colorstring_test.go [COMPLIANCE] Add Copyright and License Headers (Batch 1 of 1) (#2) 2026-02-20 15:25:59 +05:30
go.mod Enable go modules 2019-02-13 21:28:57 +00:00
LICENSE Initial commit, works 2014-07-12 09:27:01 -07:00
README.md Updated README.md with convenience method example 2015-02-28 23:31:19 +08:00

colorstring Build Status

colorstring is a Go library for outputting colored strings to a console using a simple inline syntax in your string to specify the color to print as.

For example, the string [blue]hello [red]world would output the text "hello world" in two colors. The API of colorstring allows for easily disabling colors, adding aliases, etc.

Installation

Standard go get:

$ go get github.com/mitchellh/colorstring

Usage & Example

For usage and examples see the Godoc.

Usage is easy enough:

colorstring.Println("[blue]Hello [red]World!")

Additionally, the Colorize struct can be used to set options such as custom colors, color disabling, etc.