You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mygithub.libinneed.workers.dev/wzshiming/ctc

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mygithub.libinneed.workers.dev/wzshiming/ctc

v1.2.3
Go
Version published
Created
Source

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

Support style

  • console
    • unix-like (mac & linux)
    • 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)

ValueDescriptionBehavior
0DefaultReturns all attributes to the default state prior to modification
4UnderlineAdds underline
7NegativeSwaps foreground and background colors
30~37ForegroundApplies non-bold/bright color to foreground
40~47BackgroundApplies non-bold/bright color to background
90~97Bright ForegroundApplies bold/bright color to foreground
100~107Bright BackgroundApplies bold/bright color to background

License

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

FAQs

Package last updated on 12 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts