static string GetForeground (string s) { string highcode; if (s.StartsWith ("bright")) { highcode = "1;"; s = s.Substring (6); } else highcode = ""; return "\x001b[" + highcode + (30 + NameToCode (s)).ToString () + "m"; }