From 704289ff1f487989138e85ebe8a77e92cdf30e14 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 10 May 2021 20:06:05 +0800 Subject: ... --- include/cru/platform/Color.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/cru/platform') 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 { -- cgit v1.2.3