jpedro / color

Colour your shell output

Home Page:https://pkg.go.dev/github.com/jpedro/color

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Color

Test GoDoc

Color is a library for colouring things.

Usage

package main

import (
    "fmt"
    "runtime"

    "github.com/jpedro/color"
)

func main() {
    name := "green"
    text := "Runtime OS: %s"
    fmt.Println(color.Paint(name, text, runtime.GOOS))
}

Check the cli/color for your terminal needs.

Todos

  • Create fallback color
  • Add color groups. Now via color.Parse()
  • Add custom color painters. Now via color.NewColor()
  • Name all the 256 term colors

About

Colour your shell output

https://pkg.go.dev/github.com/jpedro/color

License:MIT License


Languages

Language:Go 97.4%Language:Makefile 2.6%