Documentation
¶
Overview ¶
Package color provides simple utilities for using colors based on their message significance.
e.g. Success is light green, Error is bright red
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color int
func (Color) String ¶ added in v0.5.1
String returns an adaptive color to represent info, error, warn, or success based on the color theme of the terminal
Example ¶
Get a hex code for info color
package main
import (
"fmt"
"github.com/brittonhayes/pkg/color"
)
func main() {
// Setup the HEX code of the cyan info
// color
info := color.Info.String()
// Print out the string
// of the color
fmt.Println(info)
}
Click to show internal directories.
Click to hide internal directories.