diff options
author | Emile <hanemile@protonmail.com> | 2019-10-31 17:22:20 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-31 17:22:20 +0100 |
commit | c10cd1f770fab876acf3fa9fd7bda9b85d81d4a4 (patch) | |
tree | c846ca535992d72bd0b7b8527189929fc21fabf7 | |
parent | 72bd68424b3bc609852bff360d0ec456c0c2fe8f (diff) |
:art: color
-rw-r--r-- | src/color.go | 51 |
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) +} |