From 2ab8be6f3c56d3a8fb8cbc3853c3c1ca0f1cd007 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Thu, 28 Sep 2023 21:34:51 +0200 Subject: [PATCH] Fix color parsing --- src/color_utils.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/color_utils.cpp b/src/color_utils.cpp index 2db8c86..178281c 100644 --- a/src/color_utils.cpp +++ b/src/color_utils.cpp @@ -21,9 +21,10 @@ std::expected parseColor(std::string_view str) if (ColorHelper helper; std::sscanf(str.data(), "#%1hhx%1hhx%1hhx", &helper.r, &helper.g, &helper.b) == 3) { - helper.r <<= 4; - helper.g <<= 4; - helper.b <<= 4; + // #F00 -> #FF0000 + helper.r *= 0x11; + helper.g *= 0x11; + helper.b *= 0x11; return helper; }