Sync from fork #2

Open
CommanderRedYT wants to merge 5 commits from CommanderRedYT/main into main
3 changed files with 25 additions and 3 deletions
Showing only changes of commit 2ab8be6f3c - Show all commits

View File

@@ -21,9 +21,10 @@ std::expected<ColorHelper, std::string> parseColor(std::string_view str)
if (ColorHelper helper; std::sscanf(str.data(), "#%1hhx%1hhx%1hhx", &helper.r, &helper.g, &helper.b) == 3) if (ColorHelper helper; std::sscanf(str.data(), "#%1hhx%1hhx%1hhx", &helper.r, &helper.g, &helper.b) == 3)
{ {
helper.r <<= 4; // #F00 -> #FF0000
helper.g <<= 4; helper.r *= 0x11;
helper.b <<= 4; helper.g *= 0x11;
helper.b *= 0x11;
return helper; return helper;
} }