SetRGB Data Member Function

Sets the red, green and blue values of a <Color> object.

Prototype

int32 SetRGB( int32 p_nRed, int32 p_nGreen, int32 p_nBlue )

Parameters

Parameter Type Parameter Name Documentation
int32p_nRedThe new red value of the color, between 0 and 255.
int32p_nGreenThe new green value of the color, between 0 and 255.
int32p_nBlueThe new blue value of the color, between 0 and 255.

Examples

Copy Text To Clipboard

auto Color a;
a.SetRGB( 255, 128, 64 );

Console.Out( LibColor.Out( a ) );

Results

255, 128, 64, 0