doseeing / termblock

Little terminal colorful block lib. Convert integer array to colorful block view.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

termblock

Little terminal colorful block lib. Convert integer array to colorful block view.

View the docs.

Installation

$ go get github.com/doseeing/termblock

Example

// Alphabet as first argument, 0 -> T, 1-> F
tb := termblock.New(`TF`)
tb.Print([]int{0,1,0,1,0,1}, "Basic Example: ")

Color Example

// ANSI color code as second argument
tb := termblock.ColorNew(`TF`, []int{31,32})

tb.Print([]int{0,1,0,1,0,1}, "Color Example: ")

Color Block Example

tb := termblock.ColorNew(`▌`, []int{31,32})
tb.Print([]int{0,1,0,1,0,1}, "Color Block Example: ")

Inspired by

tj/go-spin

License

MIT

About

Little terminal colorful block lib. Convert integer array to colorful block view.


Languages

Language:Go 100.0%