summaryrefslogtreecommitdiff
path: root/source/style/color.d
diff options
context:
space:
mode:
Diffstat (limited to 'source/style/color.d')
-rw-r--r--source/style/color.d20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/style/color.d b/source/style/color.d
new file mode 100644
index 0000000..3d788b8
--- /dev/null
+++ b/source/style/color.d
@@ -0,0 +1,20 @@
+module style.color;
+
+import std.conv;
+
+enum Color {
+ black = 30,
+ red,
+ green,
+ yellow,
+ blue,
+ magenta,
+ cyan,
+ white,
+ def,
+ reset = 0
+}
+
+string setColor(string s, int code) {
+ return "%{\x1b[" ~ to!string(code) ~ "m%}" ~ s;
+}