Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1#ifndef COLOR_H
2#define COLOR_H
3
4#ifdef QT_GUI_LIB
5#include <QColor>
6#endif
7
8#include <libcockatrice/protocol/pb/color.pb.h>
9
10#ifdef QT_GUI_LIB
11inline QColor convertColorToQColor(const color &c)
12{
13 return QColor(c.r(), c.g(), c.b());
14}
15
16inline color convertQColorToColor(const QColor &c)
17{
18 color result;
19 result.set_r(c.red());
20 result.set_g(c.green());
21 result.set_b(c.blue());
22 return result;
23}
24#endif
25
26inline color makeColor(int r, int g, int b)
27{
28 color result;
29 result.set_r(r);
30 result.set_g(g);
31 result.set_b(b);
32 return result;
33}
34
35#endif
color makeColor(int r, int g, int b)
Definition color.h:26