diff options
Diffstat (limited to 'core/src/Utils')
-rw-r--r-- | core/src/Utils/Color.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/Utils/Color.hpp b/core/src/Utils/Color.hpp index 26cfdd4..5f4691f 100644 --- a/core/src/Utils/Color.hpp +++ b/core/src/Utils/Color.hpp @@ -164,8 +164,8 @@ constexpr HsvColor RgbaColor::ToHsv() const noexcept float fb = GetNormalizedGreen();
float fa = GetNormalizedAlpha();
- auto p = fg < fb ? ImVec4(fb, fg, -1, 2.0f / 3.0f) : ImVec4(fg, fb, 0, -1.0f / 3.0f);
- auto q = fr < p.x ? ImVec4(p.x, p.y, p.w, fr) : ImVec4(fr, p.y, p.z, p.x);
+ auto p = fg < fb ? Vec4f{ fb, fg, -1, 2.0f / 3.0f } : Vec4f{ fg, fb, 0, -1.0f / 3.0f };
+ auto q = fr < p.x ? Vec4f{ p.x, p.y, p.w, fr } : Vec4f{ fr, p.y, p.z, p.x };
float c = q.x - std::min(q.w, q.y);
float h = std::abs((q.w - q.y) / (6 * c + std::numeric_limits<float>::epsilon()) + q.z);
|