Skip to content

ake-persson/color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Go Report Card License

color

Terminal color package for Go

Example

package main
  
import (
        "fmt"

        "github.com/mickep76/color"
)

func main() {
        fmt.Printf("%s%s%s%s\n", color.Red, color.Bold, "Hello World!", color.Reset)

        for i := 1; i < 255; i++ {
                fmt.Printf("%s#", color.Fg256(uint8(i)))
        }
        fmt.Printf("%s\n", color.Reset)

        for i := 1; i < 255; i++ {
                fmt.Printf("%s#", color.Bg256(uint8(i)))
        }
        fmt.Printf("%s\n", color.Reset)
}

About

Terminal color package for Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published