Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scolor

A simple go library for color messages

Usage

See the example file here, so you know how to use it.

package main

import (
	scolor "github.com/SnowsSky/scolor/v2/pkg" // import the color file
)

func main() {
	// If you don't want any background :
	scolor.Cyan.DisplayText("Welcome ") // Does not create a new line
	scolor.Magenta.DisplayTextln("to ", "scolor!")

	// If you want to have a background
	scolor.DisplayText(scolor.BgRed|scolor.FgBoldBlue, "Start printing")
	// You can also choose to don't use a bg
	scolor.DisplayTextln(scolor.FgYellow, " beautifully!") // Though none of them both are beautiful

	scolor.DisplayTextln(scolor.FgBoldWhite, "scolor@"+scolor.Version) // scolor.Version returns the installed scolor version.
}

Screenshot

result

Download

Run go get github.com/SnowsSky/scolor

Contribute

Create a fork of this repo.
Clone your repo.
Create a new branch with for example your name : git switch -c <username>.
Make changes.
Commit & push your changes : git add . && git commit -m "" && git push.
Open a Pull Request.

About

A simple go library for color messages

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages