Color - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

In Game Maker and ENIGMA, Color is represented as an integer, with 8 bits each for Red, Green, and Blue.

Usually, to obtain a color, you would use a return value from one of the make_color #Functions or one of the predefined #Constants.

You may provide arguments to the make_color function or even bypass the functions by using hexidecimal. $FF is 255, so make_color($FF,$FF,$FF) would create white. GM stores colors in the integer in BGR order, so the hexidecimal digits would be $BBGGRR, which means that $FF = $0000FF = red.

Constants

_Colors.png

A number of predefined colors are already defined as constants.

The following is a list of color constants available in both Game Maker and ENIGMA, and their values (in #BBGGRR format).

Name Value
c_aqua #FFFF00
c_black #000000
c_blue #FF0000
c_dkgray #404040
c_fuchsia #FF00FF
c_gray #808080
c_green #008000
c_lime #00FF00
c_ltgray #C0C0C0
c_maroon #000080
c_navy #800000
c_olive #008080
c_orange #0080FF
c_purple #800080
c_red #0000FF
c_silver #C0C0C0
c_teal #808000
c_white #FFFFFF
c_yellow #00FFFF

Color constants

Functions

The following functions return a color.

The following functions take a color as an argument.