diff options
author | crupest <crupest@outlook.com> | 2021-05-10 20:06:05 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-05-10 20:06:05 +0800 |
commit | 704289ff1f487989138e85ebe8a77e92cdf30e14 (patch) | |
tree | 9585ef1147159df3d28717b35177a9b95ac8528a /include/cru | |
parent | 32e7c37fdf831de5b3c7f2acbbadd697989f0fab (diff) | |
download | cru-704289ff1f487989138e85ebe8a77e92cdf30e14.tar.gz cru-704289ff1f487989138e85ebe8a77e92cdf30e14.tar.bz2 cru-704289ff1f487989138e85ebe8a77e92cdf30e14.zip |
...
Diffstat (limited to 'include/cru')
-rw-r--r-- | include/cru/platform/Color.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/cru/platform/Color.hpp b/include/cru/platform/Color.hpp index efa02848..530695b2 100644 --- a/include/cru/platform/Color.hpp +++ b/include/cru/platform/Color.hpp @@ -20,8 +20,8 @@ struct Color { constexpr static Color FromHexAlpha(std::uint32_t hex) { const std::uint32_t mask = 0b11111111; - return Color((hex >> 16) & mask, (hex >> 8) & mask, hex & mask, - (hex >> 24) & mask); + return Color((hex >> 24) & mask, (hex >> 16) & mask, (hex >> 8) & mask, + hex & mask); } constexpr Color WithAlpha(std::uint8_t new_alpha) const { |