summaryrefslogtreecommitdiff
path: root/source/style/color.d
blob: 3d788b85a690f0a3646f190eec67fdd683e44043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}