Add Hex display

This commit is contained in:
Learath2 2019-05-11 02:32:37 +02:00
parent 0dd67c92f1
commit e608e2f34f

View file

@ -772,7 +772,7 @@ static void ColVariableCommand(IConsole::IResult *pResult, void *pUserData)
pData->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf); pData->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf);
ColorRGBA rgb = color_cast<ColorRGBA>(hsl); ColorRGBA rgb = color_cast<ColorRGBA>(hsl);
str_format(aBuf, sizeof(aBuf), "R: %d, G: %d, B: %d", round_truncate(rgb.r * 255), round_truncate(rgb.g * 255), round_truncate(rgb.b * 255)); str_format(aBuf, sizeof(aBuf), "R: %d, G: %d, B: %d, #%06X", round_truncate(rgb.r * 255), round_truncate(rgb.g * 255), round_truncate(rgb.b * 255), rgb.Pack() & 0xFFFFFF);
pData->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf); pData->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "console", aBuf);
if(pData->m_Alpha) if(pData->m_Alpha)