GameMaker: Studio

GameMaker: Studio

View Stats:
Kihunter Feb 8, 2015 @ 8:59pm
Hex Color Codes Displaying Weird
I'm using hex codes such as e45c10 and image_blend to colorize a pure white object. However, the colors are completely wrong when I run the code.

Example: $0078ff should be blue, but it displays orange. $00ecdc should be a lighter shade of blue, but it ends up green.

Here's the code I am using, in case I'm being an idiot and got the sytax wrong:

Step Event:
image_blend = $0078ff
< >
Showing 1-2 of 2 comments
Thew Feb 8, 2015 @ 9:12pm 
The red and blue byte are reversed -- so it's $BBGGRR. This is because Gamemaker's development is rooted in Delphi.

http://delphi.wikia.com/wiki/Colors_in_Delphi

If you find this really annoying to deal with, you might want to check out the make_color_rgb function.

http://docs.yoyogames.com/source/dadiospice/002_reference/drawing/color%20and%20blending/make_color_rgb.html
Last edited by Thew; Feb 9, 2015 @ 6:49am
Kihunter Feb 9, 2015 @ 4:08pm 
Thanks! I'm just swapping the blue and red bits; I only have 12 colors to work with.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Feb 8, 2015 @ 8:59pm
Posts: 2