GM: make color rgb

From GMpedia.org Wiki

Jump to: navigation, search
The correct title of this article is make_color_rgb(red,green,blue). It appears incorrectly here because of technical restrictions.
The correct title of this article is make_color_rgb(). It appears incorrectly here because of technical restrictions.


Arguments

red = The amount of red to use, integer from 0-255

green = The amount of green to use, integer from 0-255

blue = The amount of blue to use, integer from 0-255

Limitations

none

Note: Please remove limitations and port them in the "Remarks" section at the end of the article.

The make_color_rgb function makes a color with the specified rgb combination.

[edit] Example

orange = make_color_rgb(255,172,17);
draw_set_color(orange);
draw_text(3,3,"ZOMG Orange");

This will draw "ZOMG Orange" in the room, with an orange color.

Note that instead of values ranging from 0 to 255, we can use hexadecimal numbers ranging from $00 to $FF for each color.

[edit] See Also

This article was originally found at the Game Maker Knowledge Base, contributed by Exploding Diamond Products.
See the talk page for details
Personal tools