summaryrefslogtreecommitdiff
path: root/source/style
diff options
context:
space:
mode:
Diffstat (limited to 'source/style')
-rw-r--r--source/style/color.d28
-rw-r--r--source/style/font.d12
-rw-r--r--source/style/package.d9
3 files changed, 45 insertions, 4 deletions
diff --git a/source/style/color.d b/source/style/color.d
index 3d788b8..8576e56 100644
--- a/source/style/color.d
+++ b/source/style/color.d
@@ -1,7 +1,5 @@
module style.color;
-import std.conv;
-
enum Color {
black = 30,
red,
@@ -15,6 +13,28 @@ enum Color {
reset = 0
}
-string setColor(string s, int code) {
- return "%{\x1b[" ~ to!string(code) ~ "m%}" ~ s;
+enum Bright {
+ black = 90,
+ red,
+ green,
+ yellow,
+ blue,
+ magenta,
+ cyan,
+ white,
+ def,
+ reset = 0
+}
+
+enum Bg {
+ black = 40,
+ red,
+ green,
+ yellow,
+ blue,
+ magenta,
+ cyan,
+ white,
+ def,
+ reset = 0
}
diff --git a/source/style/font.d b/source/style/font.d
new file mode 100644
index 0000000..ae605b9
--- /dev/null
+++ b/source/style/font.d
@@ -0,0 +1,12 @@
+module style.font;
+
+enum Font {
+ bold = 1,
+ dim,
+ italic,
+ underline,
+ blinking,
+ hidden,
+ strikethrough,
+ reset = 0
+}
diff --git a/source/style/package.d b/source/style/package.d
new file mode 100644
index 0000000..76aa044
--- /dev/null
+++ b/source/style/package.d
@@ -0,0 +1,9 @@
+module style;
+
+import std.conv;
+
+import style.color;
+
+string set(string s, int code) {
+ return ("%{\x1b[" ~ to!string(code) ~ "m%}") ~ s ~ ("%{\x1b[0m%}");
+}