colour_get_red

Returns the red component of the colour given.

Syntax:

GML Code Example

colour_get_red(col);


Argument Description
col The colour to check


Returns: Real


Description

This function returns the amount of red used to make the given colour, with the value being between 0 and 255, where 0 is no red and 255 is all red. The following image illustrates this:


Example:

GML Code Example

r_comp = colour_get_red(c_teal);

The above code will get the red component of the colour constant "c_teal" and store the value in the variable "r_comp".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here