From 7fa6f61b1d7b253f749be73a4bfeee9a77cd2e88 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 22 Aug 2021 21:15:33 +0800 Subject: ... --- include/cru/platform/Color.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/cru/platform') diff --git a/include/cru/platform/Color.hpp b/include/cru/platform/Color.hpp index a6793269..3388de25 100644 --- a/include/cru/platform/Color.hpp +++ b/include/cru/platform/Color.hpp @@ -32,6 +32,11 @@ struct CRU_PLATFORM_API Color { return result; } + float GetFloatRed() const { return static_cast(red) / 255.f; } + float GetFloatGreen() const { return static_cast(green) / 255.f; } + float GetFloatBlue() const { return static_cast(blue) / 255.f; } + float GetFloatAlpha() const { return static_cast(alpha) / 255.f; } + std::string ToUtf8String() const; std::u16string ToString() const; -- cgit v1.2.3