declare_folded_class NO LONGER _in_file
[hiphop-php.git] / hphp / util / text-color.h
blobd04e58b20a68c4a905257e6e6aaa580a1d4dceca
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
16 #pragma once
18 #include <string>
19 #include <vector>
21 namespace HPHP {
22 ///////////////////////////////////////////////////////////////////////////////
24 const char ANSI_COLOR_BLACK[] = "\033[22;30m";
25 const char ANSI_COLOR_RED[] = "\033[22;31m";
26 const char ANSI_COLOR_GREEN[] = "\033[22;32m";
27 const char ANSI_COLOR_BROWN[] = "\033[22;33m";
28 const char ANSI_COLOR_BLUE[] = "\033[22;34m";
29 const char ANSI_COLOR_MAGENTA[] = "\033[22;35m";
30 const char ANSI_COLOR_CYAN[] = "\033[22;36m";
31 const char ANSI_COLOR_GRAY[] = "\033[22;37m";
33 const char ANSI_COLOR_DARK_GRAY[] = "\033[01;30m";
34 const char ANSI_COLOR_LIGHT_RED[] = "\033[01;31m";
35 const char ANSI_COLOR_LIGHT_GREEN[] = "\033[01;32m";
36 const char ANSI_COLOR_YELLOW[] = "\033[01;33m";
37 const char ANSI_COLOR_LIGHT_BLUE[] = "\033[01;34m";
38 const char ANSI_COLOR_LIGHT_MAGENTA[] = "\033[01;35m";
39 const char ANSI_COLOR_LIGHT_CYAN[] = "\033[01;36m";
40 const char ANSI_COLOR_WHITE[] = "\033[01;37m";
42 const char ANSI_BGCOLOR_BLACK[] = ";40m";
43 const char ANSI_BGCOLOR_RED[] = ";41m";
44 const char ANSI_BGCOLOR_GREEN[] = ";42m";
45 const char ANSI_BGCOLOR_BROWN[] = ";43m";
46 const char ANSI_BGCOLOR_BLUE[] = ";44m";
47 const char ANSI_BGCOLOR_MAGENTA[] = ";45m";
48 const char ANSI_BGCOLOR_CYAN[] = ";46m";
49 const char ANSI_BGCOLOR_GRAY[] = ";47m";
51 const char ANSI_COLOR_END[] = "\033[0m";
53 extern const char *s_stdout_color;
54 extern const char *s_stderr_color;
56 void get_supported_colors(std::vector<std::string> &names);
58 const char *get_color_by_name(const std::string &name);
59 const char *get_bgcolor_by_name(const std::string &name);
60 std::string add_bgcolor(const char *color, const char *bgcolor);
62 ///////////////////////////////////////////////////////////////////////////////