GxColor.CreateRGB

Fore Syntax

CreateRGB(R: Integer; G: Integer; B: Integer);

Fore.NET Syntax

CreateRGB(R: Integer; G: Integer; B: Integer);

Parameters

R. Red color component.

G. Green color component.

B. Blue color component.

Description

The CreateRGB constructor creates a new color in accordance with the specified values of red, green and blue components.

Fore Example

Function GetColorRGB(R: Integer; G: Integer; B: Integer): IGxColor;
Var
    OutColor: IGxColor;
Begin
    If (R >= 0And (R <= 255And
        (G >= 0And (G <= 255And
        (B >= 0And (B <= 255Then
        OutColor := New GxColor.CreateRGB(R, G, B);
        Return OutColor;
    Else
        Return Null;
    End If;
End Function GetColorRGB;

This function returns the color created in accordance with the values of red, green and blue color components.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetColorRGB(R: integer; G: integer; B: integer): GxColor;
Var
    OutColor: GxColor;
Begin
    If (R >= 0And (R <= 255And
        (G >= 0And (G <= 255And
        (B >= 0And (B <= 255Then
        OutColor := New GxColorClass_2();
        OutColor.CreateRGB(R, G, B);
    Else
        Return Null
    End If;
End Function;

This function returns the color created in accordance with the values of red, green and blue color components.

See also:

GxColor