Merge branch 'ColorPickerAdvanced' of https://github.com/Azaezel/Torque3D into ColorPickerAdvanced

This commit is contained in:
Azaezel 2016-02-21 15:31:09 -06:00
commit bc433e7c30
6 changed files with 257 additions and 276 deletions

View file

@ -875,9 +875,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), ,