summaryrefslogtreecommitdiff
path: root/src/helpers/Color.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-24 11:22:44 +0200
committerGitHub <noreply@github.com>2022-04-24 11:22:44 +0200
commit6679a4786b593cbe5050931261566fab9aa77f1f (patch)
treea090b5c34cb75d4328c79f587018457a5e589c0a /src/helpers/Color.hpp
parentfc14157d765ce44e634525b2c437808e20ec93d6 (diff)
parent1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a (diff)
Merge pull request #55 from vaxerski/animation-system-rework
Animation system rework
Diffstat (limited to 'src/helpers/Color.hpp')
-rw-r--r--src/helpers/Color.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/helpers/Color.hpp b/src/helpers/Color.hpp
index 7c0d30be..c34dc787 100644
--- a/src/helpers/Color.hpp
+++ b/src/helpers/Color.hpp
@@ -11,5 +11,17 @@ public:
float r = 0, g = 0, b = 0, a = 255;
uint64_t getAsHex();
+
+ CColor operator- (const CColor& c2) const {
+ return CColor(r - c2.r, g - c2.g, b - c2.b, a - c2.a);
+ }
+
+ CColor operator+ (const CColor& c2) const {
+ return CColor(r + c2.r, g + c2.g, b + c2.b, a + c2.a);
+ }
+
+ CColor operator* (const float& v) const {
+ return CColor(r * v, g * v, b * v, a * v);
+ }
}; \ No newline at end of file