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
  1. /// hex_to_color(hex)
  2. //
  3. // Returns an RGB color from a given hexadecimal color code.
  4. // Depends on hex_to_dec().
  5. //
  6. // hex hexadecimal color in RRGGBB format, string
  7. //
  8. /// gmlscripts.pro/license
  9. {
  10. var hex,dec,col;
  11. hex = argument0;
  12. dec = hex_to_dec(hex);
  13. col = (dec & 16711680) >> 16 | (dec & 65280) | (dec & 255) << 16;
  14. return col;
  15. }

Contributors: xot

GitHub: View · Commits · Blame · Raw