fixed the not working text edit RGB field on color picker.

This commit is contained in:
Anis 2016-02-21 18:14:41 +01:00
parent df283a2709
commit 494922d9ed

View file

@ -879,9 +879,11 @@ DefineConsoleFunction(ColorHEXToRGB, ColorI, (const char* hex), ,
"@endtsexample\n"
"@ingroup Strings")
{
ColorI color;
color.set(hex);
return color;
S32 rgb = dAtoui(hex, 16);
ColorI color;
color.set(rgb & 0x000000FF, (rgb & 0x0000FF00) >> 8, (rgb & 0x00FF0000) >> 16);
return color;
}
DefineConsoleFunction(ColorHSBToRGB, ColorI, (Point3I hsb), ,