mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 15:11:57 -07:00
Normalize color storage
Colors are now normalized to 0 - 1 values instead of 0 - 255 causes calculations to be simpler and generally cleans up the codebase.
This commit is contained in:
@@ -8,12 +8,12 @@ class CColor {
|
||||
CColor(float, float, float, float);
|
||||
CColor(uint64_t);
|
||||
|
||||
float r = 0, g = 0, b = 0, a = 255;
|
||||
float r = 0, g = 0, b = 0, a = 1.f;
|
||||
|
||||
uint64_t getAsHex();
|
||||
|
||||
CColor operator-(const CColor& c2) const {
|
||||
return CColor(r - c2.r, g - c2.g, b - c2.b, a - c2.a);
|
||||
return CColor(r - c2.r, g - c2.g, b - c2.b, a - c2.a);
|
||||
}
|
||||
|
||||
CColor operator+(const CColor& c2) const {
|
||||
|
Reference in New Issue
Block a user