Skip to content

mallvielfrass/fmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FMC

Library for coloring text in the console.

Features

  • specify tags directly in the formatting string;
  • Support prinft/print/println;

Color:

  • yst Yellow

  • ybt Yellow, Bold

  • rst Red

  • rbt Red, Bold

  • gst Green

  • gbt Green, Bold

  • bst Blue

  • bbt Blue, Bold

  • wst White

  • wbt White, Bold

Color Description:

in hashtag:

  • first char it is Color name(Red,Blue..)
  • second char it is font weight slim\bold
  • first char it is background color transparent (another colors not implemented yet)

Examples:

package main
import "github.com/mallvielfrass/fmc"
func main() {
colors := [10]string{"yst", "ybt", "rst", "rbt", "gst", "gbt", "bst", "bbt", "wst", "wbt"}
for _, value := range colors {
	fmc.Printf("color: #"+value+value+" %s\n", "test")
}

fmc.Printf("#ybt I#rbt  love#bbt  Go#gbt!\n")
fmc.Printf("#ybt %s#rbt  %s#bbt  %s#gbt%s\n", "I", "love", "Go", "!")
fmc.Print("#ybt lol")
fmc.Printfln("#ybt  %s", "I")
fmc.Println("#bbt Println")
}

Result

Result;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages