about summary refs log tree commit diff
path: root/src/color.go
blob: adcd3f054bcc8957fb0d60c31d697f59ac39c40a (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
package main

import "fmt"

func red(text string) string {
	return fmt.Sprintf("\033[0;31m%s\033[0m", text)
}

func boldRed(text string) string {
	return fmt.Sprintf("\033[1;31m%s\033[0m", text)
}

func green(text string) string {
	return fmt.Sprintf("\033[0;32m%s\033[0m", text)
}

func boldGreen(text string) string {
	return fmt.Sprintf("\033[1;32m%s\033[0m", text)
}

func yellow(text string) string {
	return fmt.Sprintf("\033[0;33m%s\033[0m", text)
}

func boldYellow(text string) string {
	return fmt.Sprintf("\033[1;33m%s\033[0m", text)
}

func blue(text string) string {
	return fmt.Sprintf("\033[0;34m%s\033[0m", text)
}

func boldBlue(text string) string {
	return fmt.Sprintf("\033[1;34m%s\033[0m", text)
}

func magenta(text string) string {
	return fmt.Sprintf("\033[0;35m%s\033[0m", text)
}

func boldMagenta(text string) string {
	return fmt.Sprintf("\033[1;35m%s\033[0m", text)
}

func cyan(text string) string {
	return fmt.Sprintf("\033[0;36m%s\033[0m", text)
}

func boldCyan(text string) string {
	return fmt.Sprintf("\033[1;36m%s\033[0m", text)
}