96 self::$FORMAT_BOLD = `tput bold`;
97 self::$FORMAT_OBFUSCATED = `tput smacs`;
98 self::$FORMAT_ITALIC = `tput sitm`;
99 self::$FORMAT_UNDERLINE = `tput smul`;
100 self::$FORMAT_STRIKETHROUGH =
"\x1b[9m";
102 self::$FORMAT_RESET = `tput sgr0`;
104 $colors = (int) `tput colors`;
106 self::$COLOR_BLACK = $colors >= 256 ? `tput setaf 16` : `tput setaf 0`;
107 self::$COLOR_DARK_BLUE = $colors >= 256 ? `tput setaf 19` : `tput setaf 4`;
108 self::$COLOR_DARK_GREEN = $colors >= 256 ? `tput setaf 34` : `tput setaf 2`;
109 self::$COLOR_DARK_AQUA = $colors >= 256 ? `tput setaf 37` : `tput setaf 6`;
110 self::$COLOR_DARK_RED = $colors >= 256 ? `tput setaf 124` : `tput setaf 1`;
111 self::$COLOR_PURPLE = $colors >= 256 ? `tput setaf 127` : `tput setaf 5`;
112 self::$COLOR_GOLD = $colors >= 256 ? `tput setaf 214` : `tput setaf 3`;
113 self::$COLOR_GRAY = $colors >= 256 ? `tput setaf 145` : `tput setaf 7`;
114 self::$COLOR_DARK_GRAY = $colors >= 256 ? `tput setaf 59` : `tput setaf 8`;
115 self::$COLOR_BLUE = $colors >= 256 ? `tput setaf 63` : `tput setaf 12`;
116 self::$COLOR_GREEN = $colors >= 256 ? `tput setaf 83` : `tput setaf 10`;
117 self::$COLOR_AQUA = $colors >= 256 ? `tput setaf 87` : `tput setaf 14`;
118 self::$COLOR_RED = $colors >= 256 ? `tput setaf 203` : `tput setaf 9`;
119 self::$COLOR_LIGHT_PURPLE = $colors >= 256 ? `tput setaf 207` : `tput setaf 13`;
120 self::$COLOR_YELLOW = $colors >= 256 ? `tput setaf 227` : `tput setaf 11`;
121 self::$COLOR_WHITE = $colors >= 256 ? `tput setaf 231` : `tput setaf 15`;
123 self::$COLOR_BLACK = self::$COLOR_DARK_GRAY = `tput setaf 0`;
124 self::$COLOR_RED = self::$COLOR_DARK_RED = `tput setaf 1`;
125 self::$COLOR_GREEN = self::$COLOR_DARK_GREEN = `tput setaf 2`;
126 self::$COLOR_YELLOW = self::$COLOR_GOLD = `tput setaf 3`;
127 self::$COLOR_BLUE = self::$COLOR_DARK_BLUE = `tput setaf 4`;
128 self::$COLOR_LIGHT_PURPLE = self::$COLOR_PURPLE = `tput setaf 5`;
129 self::$COLOR_AQUA = self::$COLOR_DARK_AQUA = `tput setaf 6`;
130 self::$COLOR_GRAY = self::$COLOR_WHITE = `tput setaf 7`;