Add true hex color notation support to Game Maker Studio!

Hex or HTML color notation is one of the most popular formats for defining color, and is used across thousands of professional applications and programming and design languages. Its brevity and simplicity make it easy to use and remember, and is already the preferred form of notation for countless developers.

While Game Maker Studio has long had a rudimentary implementation of hex color notation its uses are severely limited and don't follow standard hex syntax. With Edge Engine's make_color_hex script, however, using standard hex notation for any purpose is as easy as built-in Game Maker standards—in fact, if hex is your preferred color notation, it's easier!

Wherever you wish to use hex color notation in your GML projects, simply run the script with the first argument being the desired color in quotes, such as:


As an added bonus, inclusion of the # symbol is optional, and if any sort of malformed input is supplied, the script will do its best to return the closest approximation to the input, or if all else fails, return c_white.

Not familiar with hex notation?

No problem! There are many different hex color pickers across the web, such as Between make_color_hex and a simple online color picker, you'll always be able to have the perfect color selection tools at your fingertips, no knowledge of hex notation required!

Already an Edge Engine user?

This script is included with Edge VN—if you own Edge VN, you already have make_color_hex!

More info

End User Licence Agreement (EULA).

Changes in 1.1.2


• Improved performance


• Updated script to handle lower-case input


• Improved internal script syntax and demo


• Initial standalone release

Version 1.1.2. Published February 10, 2018

Created with GameMaker: Studio v1.4.1772

Age Rating: 4+

Privacy Policy

Average Rating

Your review

You can only review assets you've bought.


Loi R 07 April 2018


Andrjus V 17 May 2017

Very helpful script!

I have noticed that when I was not using upper case letters for the hex code (such as #ffa302 instead of #FFA302 when I copied colors from Photoshop), the script generated the wrong color. So I've added following string: "argument0 = string_upper(argument0);" into the script on my PC to fix this.

ThinkBoxly, can you please update the script.

This review was left for a previous version of this asset.


ThinkBoxly (Publisher) 23 May 2017

Updated. Thanks for your work in discovering the problem!


Alex M 01 February 2017

Helpful Script Almost Calculates Hex Correctly

Hey ThinklBoxly,

Thanks a ton for this script, it helped me easily put Hex Color in my game. I did notice when I printed the R G B values after the calculations, they were actually off by a bit. Turns out it wasn't a GM Issue.

Im not sure the technical reasoning I think its in how a double hex value works? I used the user "Dmi7ry"'s convert_hex_to_dec(value) to run on the strings that are cut out and it works perfectly. There might be something useful in there to fix the conversion!


This review was left for a previous version of this asset.


ThinkBoxly (Publisher) 02 February 2017

Hi Alex, thanks for the review!

I've tried to confirm your findings by comparing results between make_color_hex and convert_hex_to_dec and found that the resulting values were identical in every case. Furthermore, convert_hex_to_dec uses a BGR syntax, which is already built in to GameMaker and thus not really necessary. The make_color_hex script uses RGB, so if you input the same value to both scripts you would get different values because the color channels are in a different order.

If you can provide a working example where the script fails to generate the correct value I will certainly look into correcting it, but currently I'm unable to reproduce any issues on my end. Should you find anything, you can always reach me at the support link above.


Peter T 11 August 2016

Script doesn't return the right color.

Tried to compared the output from your script with and the colors does not match.

This review was left for a previous version of this asset.


ThinkBoxly (Publisher) 12 August 2016

Hi Peter,

The difference is due to GameMaker's handling of color, not this script. Color values generated by make_color_hex are identical to the values generated by the built-in make_color_rgb function, however GameMaker's drawing process may alter the color slightly due to blending (i.e. drawing the same color on a black background and a white background may result in two slightly different colors). As this is an 'issue' with GameMaker itself, it is unfortunately beyond my control.


Matthias S 03 April 2016

Thank you so much, very usefull script!

This review was left for a previous version of this asset.

Package contents

Loading, please wait

What is the issue?

Back to Top