diff options
author | Shav Kinderlehrer <[email protected]> | 2023-08-09 15:05:26 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-08-09 15:05:26 -0400 |
commit | 24c94e510ab9c016542b287e060c992c195d7987 (patch) | |
tree | b7cd353d3bf4a6a4220fde5c4b6a878c97c23022 /source/style | |
parent | dd5c94c3174cc0fee0cbae4b51d47589894d0e5d (diff) | |
download | prim-24c94e510ab9c016542b287e060c992c195d7987.tar.gz prim-24c94e510ab9c016542b287e060c992c195d7987.zip |
Start add basic prompt
Diffstat (limited to 'source/style')
-rw-r--r-- | source/style/color.d | 20 |
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; +} |