SplitRGBaValue

Category: Arithmetics
Since engine version: 1.0 OC (returns proplist since 8.0 OC)

Description

Returns a proplist with the red, green, blue, and alpha values of the specified 32 bit color value: {R = red, G = green, B = blue, Alpha = alpha}

Syntax

proplist SplitRGBaValue(int rgba);

Parameter

rgba:
32 bit color value

Example

var rgba = SplitRGBaValue(GetCursor()->GetColor());
GetCursor()->Message("R: %d|G: %d|B: %d|A: %d", rgba.R, rgba.G, rgba.B, rgba.Alpha);
				
Displays the four color values of the currently selected clonk above the clonk's head.
See also: GetRGBaValue, SetRGBaValue
Tyron, 2004-09