Popularity
2.1
Growing
Activity
0.5
-
31
0
1

Programming language: Go
License: MIT License
Latest version: v1.2.3

ctc alternatives and similar packages

Based on the "Advanced Console UIs" category.
Alternatively, view ctc alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of ctc or a related project?

Add another 'Advanced Console UIs' Package

README

ctc - Console Text Colors

Build Status Go Report Card GoDoc GitHub license gocover.io

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

Support style

  • [x] console
    • [x] unix-like (mac & linux)
    • [x] windows

example

package main

import (
    "fmt"

    "github.com/wzshiming/ctc"
)

func main() {
    // No invasion
    fmt.Println(ctc.BackgroundRed|ctc.ForegroundBlue, "Hello world", ctc.Reset)
}

SGR (Select Graphic Rendition)

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

License

Pouch is licensed under the MIT License. See LICENSE for the full license text.


*Note that all licence references and agreements mentioned in the ctc README section above are relevant to that project's source code only.