diff options
author | Shav Kinderlehrer <[email protected]> | 2023-08-09 16:01:15 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-08-09 16:01:15 -0400 |
commit | 85f830ce4730da0489bc14d8726de7fb2dd0fc38 (patch) | |
tree | 811707c736ce7098b5655f018219c5093518f0a0 /source/style/color.d | |
parent | 24c94e510ab9c016542b287e060c992c195d7987 (diff) | |
download | prim-85f830ce4730da0489bc14d8726de7fb2dd0fc38.tar.gz prim-85f830ce4730da0489bc14d8726de7fb2dd0fc38.zip |
Add styles
Diffstat (limited to 'source/style/color.d')
-rw-r--r-- | source/style/color.d | 28 |
1 files changed, 24 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 } |