From 33aa2248d2694a63a9c7b968633f64ed1157c3df Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 11 May 2025 11:05:53 +0200 Subject: [PATCH] fix: Theme color alpha not being applied correctly to accented colors --- lib/libimhex/source/api/theme_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libimhex/source/api/theme_manager.cpp b/lib/libimhex/source/api/theme_manager.cpp index 6f45f3f82..9aab2b492 100644 --- a/lib/libimhex/source/api/theme_manager.cpp +++ b/lib/libimhex/source/api/theme_manager.cpp @@ -27,10 +27,10 @@ namespace hex { return { h, s, v }; } - ImColor getRGB(float h, float s, float v) { + ImColor getRGB(float h, float s, float v, float a) { float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b); - return ImColor(r, g, b); + return ImColor(r, g, b, a); } } @@ -195,7 +195,7 @@ namespace hex { colorS = std::max(colorS - baseS, 0.0F) + accentS; colorV = std::max(colorV - baseV, 0.0F) + accentV; - color = getRGB(colorH, colorS, colorV); + color = getRGB(colorH, colorS, colorV, color->Value.w); } (*s_themeHandlers)[type].setFunction((*s_themeHandlers)[type].colorMap.at(key), color.value());