You are currently viewing the gmlscripts.pro static mirror. Forum access and script submissions are not available through this mirror.

Invert gmlscripts.pro

hex_to_color

NOTE: Depends on hex_to_dec().

hex_to_color(hex)
Returns an RGB color from a given hexadecimal color code.
COPY/// hex_to_color(hex)
//
//  Returns an RGB color from a given hexadecimal color code.
//  Depends on hex_to_dec().
//
//      hex         hexadecimal color in RRGGBB format, string
//
/// gmlscripts.pro/license
{
    var hex,dec,col;
    hex = argument0;
    dec = hex_to_dec(hex);
    col = (dec & 16711680) >> 16 | (dec & 65280) | (dec & 255) << 16;
    return col;
}

Contributors: xot

GitHub: View · Commits · Blame · Raw