Tocolor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 12: Line 12:
* '''green:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space green] in the color (0-255).
* '''green:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space green] in the color (0-255).
* '''blue:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space blue] in the color (0-255).
* '''blue:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space blue] in the color (0-255).
===Optional Arguments===
* '''alpha:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space alpha] in the color (0-255).
* '''alpha:''' The amount of [http://en.wikipedia.org/wiki/RGBA_color_space alpha] in the color (0-255).



Revision as of 13:46, 5 March 2008

This function retrieves the hex number of a specified color, useful for the dx functions.

Syntax

int tocolor ( int red, int green, int blue [, int alpha = 255] )

Required Arguments

  • red: The amount of red in the color (0-255).
  • green: The amount of green in the color (0-255).
  • blue: The amount of blue in the color (0-255).

Optional Arguments

  • alpha: The amount of alpha in the color (0-255).

Returns

Returns a single value representing the color.

Example

--TODO

See Also