vCalendar: Honor VTIMEZONE component if present
[claws.git] / src / plugins / litehtml_viewer / litehtml / web_color.h
bloba42b416ca2275283022babe4b7a513fcea35b4de
1 #ifndef LH_WEB_COLOR_H
2 #define LH_WEB_COLOR_H
4 namespace litehtml
6 struct def_color
8 const char* name;
9 const char* rgb;
12 extern def_color g_def_colors[];
14 class document_container;
16 struct web_color
18 byte red;
19 byte green;
20 byte blue;
21 byte alpha;
23 static const web_color transparent;
24 static const web_color black;
25 static const web_color white;
27 web_color(byte r, byte g, byte b, byte a = 255)
29 red = r;
30 green = g;
31 blue = b;
32 alpha = a;
35 web_color()
37 red = 0;
38 green = 0;
39 blue = 0;
40 alpha = 0xFF;
43 bool operator==(web_color color) const { return red == color.red && green == color.green && blue == color.blue && alpha == color.alpha; }
44 bool operator!=(web_color color) const { return !(*this == color); }
46 string to_string() const;
47 static web_color from_string(const string& str, document_container* callback);
48 static string resolve_name(const string& name, document_container* callback);
49 static bool is_color(const string& str, document_container* callback);
53 #endif // LH_WEB_COLOR_H