aboutsummaryrefslogtreecommitdiff
path: root/include/dchat/Color.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/dchat/Color.hpp')
-rw-r--r--include/dchat/Color.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/dchat/Color.hpp b/include/dchat/Color.hpp
new file mode 100644
index 0000000..2a5d121
--- /dev/null
+++ b/include/dchat/Color.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+namespace dchat
+{
+ class Color
+ {
+ public:
+ Color() : Color(255, 255, 255, 255) {}
+ Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 255)
+ {
+ data[0] = red;
+ data[1] = green;
+ data[2] = blue;
+ data[3] = alpha;
+ }
+
+ unsigned char red() const { return data[0]; }
+ unsigned char green() const { return data[1]; }
+ unsigned char blue() const { return data[2]; }
+ unsigned char alpha() const { return data[3]; }
+
+ unsigned char data[4];
+ };
+} \ No newline at end of file