The non-invasive cross-platform terminal color library does not need to modify the Print method
Virtual unix-like environments on Windows
Cursor related in github.com/wzshiming/cursor
- console
- unix-like (mac & linux)
- windows
package main
import (
"fmt"
"github.com/wzshiming/ctc"
)
func main() {
// No invasion
fmt.Println(ctc.BackgroundRed|ctc.ForegroundBlue, "Hello world", ctc.Reset)
}
Value | Description | Behavior |
---|---|---|
0 | Default | Returns all attributes to the default state prior to modification |
4 | Underline | Adds underline |
7 | Negative | Swaps foreground and background colors |
30~37 | Foreground | Applies non-bold/bright color to foreground |
40~47 | Background | Applies non-bold/bright color to background |
90~97 | Bright Foreground | Applies bold/bright color to foreground |
100~107 | Bright Background | Applies bold/bright color to background |
Pouch is licensed under the MIT License. See LICENSE for the full license text.