ToConstant

function

ToConstant()

Description

Encodes the color into a single value, compatible with GameMaker's color constants. Ignores the alpha channel.

Returns

Real The color as a single value.

Example

var _red = new BBMOD_Color(255, 0, 0);
show_debug_message(_red.ToConstant() == c_red); // Prints true
Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on May 18, 2022 using GMDoc.