-
Notifications
You must be signed in to change notification settings - Fork 0
/
utility_extras.go
39 lines (31 loc) · 2.39 KB
/
utility_extras.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package examples
import (
"fmt"
"github.com/go-color-term/go-color-term/coloring"
)
type UtilityExtrasExample struct{}
func (example *UtilityExtrasExample) GetTitle() string {
return "Bright colors (utility extras)"
}
func (example *UtilityExtrasExample) GetDescription() string {
return "Example of bright color functions in utility.Extras."
}
func (example *UtilityExtrasExample) Run() {
fmt.Printf("%s %s\n", coloring.BgWhite(coloring.Black("Normal black ")), coloring.BgWhite(coloring.Extras.BrightBlack("bright black ")))
fmt.Printf("%s %s\n", coloring.Red("Normal red "), coloring.Extras.BrightRed("bright red "))
fmt.Printf("%s %s\n", coloring.Green("Normal green "), coloring.Extras.BrightGreen("bright green "))
fmt.Printf("%s %s\n", coloring.Yellow("Normal yellow "), coloring.Extras.BrightYellow("bright yellow "))
fmt.Printf("%s %s\n", coloring.Blue("Normal blue "), coloring.Extras.BrightBlue("bright blue "))
fmt.Printf("%s %s\n", coloring.Magenta("Normal magenta "), coloring.Extras.BrightMagenta("bright magenta "))
fmt.Printf("%s %s\n", coloring.Cyan("Normal cyan "), coloring.Extras.BrightCyan("bright cyan "))
fmt.Printf("%s %s\n", coloring.White("Normal white "), coloring.Extras.BrightWhite("bright white "))
fmt.Println()
fmt.Printf("%s %s\n", coloring.BgBlack("Normal black "), coloring.Extras.BgBrightBlack("bright black "))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgRed("Normal red ")), coloring.Black(coloring.Extras.BgBrightRed("bright red ")))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgGreen("Normal green ")), coloring.Black(coloring.Extras.BgBrightGreen("bright green ")))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgYellow("Normal yellow ")), coloring.Black(coloring.Extras.BgBrightYellow("bright yellow ")))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgBlue("Normal blue ")), coloring.Black(coloring.Extras.BgBrightBlue("bright blue ")))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgMagenta("Normal magenta ")), coloring.Black(coloring.Extras.BgBrightMagenta("bright magenta ")))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgCyan("Normal cyan ")), coloring.Black(coloring.Extras.BgBrightCyan("bright cyan ")))
fmt.Printf("%s %s\n", coloring.Black(coloring.BgWhite("Normal white ")), coloring.Black(coloring.Extras.BgBrightWhite("bright white ")))
}