-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcolor.h
45 lines (37 loc) · 839 Bytes
/
color.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _COLOR_H_
#define _COLOR_H_
#include <string>
void init_colors();
enum nc_color {
c_black = 0,
c_ltgray,
c_red,
c_green,
c_blue,
c_cyan,
c_magenta,
c_brown,
// "Bright" colors
c_dkgray,
c_white,
c_ltred,
c_ltgreen,
c_ltblue,
c_ltcyan,
c_pink,
c_yellow,
c_null
};
long get_color_pair(nc_color fg, nc_color bg);
void extract_colors(long color, long attributes,
nc_color &fg, nc_color &bg);
nc_color color_string (std::string id);
std::string color_name (nc_color color);
std::string color_tag (nc_color color);
nc_color hilight (nc_color orig);
nc_color opposite (nc_color orig);
nc_color contrast (nc_color orig);
bool is_bright (nc_color col);
nc_color brighten (nc_color col);
nc_color non_bright (nc_color col);
#endif