BBMOD_Color

constructor

new BBMOD_Color([_red, _green, _blue])

Description

A color with support for high dynamic range.

Arguments

Name Type Description
_red Real The value of the red channel. Use values in range 0..BBMOD_RGBM_VALUE_MAX. Defaults to 255.
_green Real The value of the green channel. Use values in range 0..BBMOD_RGBM_VALUE_MAX. Defaults to 255.
_blue Real The value of the blue channel. Use values in range 0..BBMOD_RGBM_VALUE_MAX. Defaults to 255.
_alpha Real The value of the alpha channel. Use values in range 0..1. Defaults to 1.

Properties

Name Description
Alpha The value of the alpha channel.
Blue The value of the blue color channel.
Green The value of the green color channel.
Red The value of the red color channel.

Methods

Name Description
Clone Creates a clone of the color struct.
Copy Copies properties to another color struct.
FromConstant Initializes the color using a color constant.
FromHSV Initializes the color using HSV. Alpha channel is set to 1.
FromHex Initializes the color using RRGGBB hexadecimal format. Alpha channel is set to 1.
FromRGBA Initializes the color using RGBA.
Mix Mixes two colors.
ToConstant Encodes the color into a single value, compatible with GameMaker's color constants. Ignores the alpha channel.
ToHSV Encodes the color into HSV format, ignoring the alpha channel.
ToRGBM Encodes the color into RGBM format, ignoring the alpha channel.

See also

BBMOD_C_AQUA, BBMOD_C_BLACK, BBMOD_C_BLUE, BBMOD_C_DKGRAY, BBMOD_C_FUCHSIA, BBMOD_C_GRAY, BBMOD_C_GREEN, BBMOD_C_LIME, BBMOD_C_LTGRAY, BBMOD_C_MAROON, BBMOD_C_NAVY, BBMOD_C_OLIVE, BBMOD_C_ORANGE, BBMOD_C_PURPLE, BBMOD_C_RED, BBMOD_C_SILVER, BBMOD_C_TEAL, BBMOD_C_WHITE, BBMOD_C_YELLOW, BBMOD_RGBM_VALUE_MAX

Do you find this page helpful?

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