SplitRGBaValue

Category: Arithmetics
Since engine version: 4.9.5.0 CE

Description

Writes the red, green, blue, and alpha values of a 32 bit color value to the specified variables.

Syntax

bool SplitRGBaValue (int Val, int iRed, int iGreen, int iBlue, int iAlpha);

Parameters

Val:
32 bit color value
iRed:
[opt] variable in which the red value is to be stored
iGreen:
[opt] variable in which the green value is to be stored
iBlue:
[opt] variable in which the blue value is to be stored
iAlpha:
[opt] variable in which the alpha value is to be stored

Example

var red, green, blue;
SplitRGBaValue(GetColorDw(GetCursor()),red,green,blue);
Message("Rot: %d|Grün %d|Blau %d",GetCursor(),red, green, blue);
				
Displays the three color values of the currently selected clonk above the clonk's head
See also: GetRGBaValue, SetRGBaValue
Tyron, September 2004