summaryrefslogtreecommitdiff
path: root/Color.hs
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2023-01-09 11:08:02 +0800
committerFrederick Yin <fkfd@fkfd.me>2023-01-09 11:08:02 +0800
commitd034b9c9273a7f3ff91554c4b605dd488207caa1 (patch)
tree2eb992ddb5a35371ea355050f9d83e7a5eccf4ef /Color.hs
parent552b8a0a8ed89fdc85459037f19ae0a13bfe6702 (diff)
Display player's cards in color
Diffstat (limited to 'Color.hs')
-rw-r--r--Color.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Color.hs b/Color.hs
new file mode 100644
index 0000000..1d63fcd
--- /dev/null
+++ b/Color.hs
@@ -0,0 +1,13 @@
+module Color where
+
+red :: String -> String
+red s = "\x001b[31m" ++ s ++ "\x001b[0m"
+
+green :: String -> String
+green s = "\x001b[32m" ++ s ++ "\x001b[0m"
+
+yellow :: String -> String
+yellow s = "\x001b[33m" ++ s ++ "\x001b[0m"
+
+blue :: String -> String
+blue s = "\x001b[34m" ++ s ++ "\x001b[0m"