about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/color.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/color.go b/src/color.go
new file mode 100644
index 0000000..adcd3f0
--- /dev/null
+++ b/src/color.go
@@ -0,0 +1,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)
+}