GxColor.CreateHSB

Fore Syntax

CreateHSB(H: Double; S: Double; B: Double);

Fore.NET Syntax

CreateHSB(H: Double; S: Double; B: Double);

Parameters

H. Color hue in degrees from 0.0 to 360.0.

S. Color saturation from 0.0 to 1.0.

B. Color brightness from 0.0 to 1.0.

Description

The CreateHSB constructor creates a new color in accordance with the specified values of hue, saturation and brightness.

Fore Example

Function GetColorHSB(H: Double; S: Double; B: Double): IGxColor;
Var
    OutColor: IGxColor;
Begin
    If (H >= 0And (H <= 360And
        (S >= 0And (S <= 1And
        (B >= 0And (B <= 1Then
        OutColor := New GxColor.CreateHSB(H, S, B);
        Return OutColor;
    Else
        Return Null;
    End If;
End Function GetColorHSB;

The function returns the color created in accordance with values of color hue, saturation and brightness.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetColorHSB(H: Double; S: Double; B: Double): GxColor;
Var
    OutColor: GxColor;
Begin
    If (H >= 0And (H <= 360And
        (S >= 0And (S <= 1And
        (B >= 0And (B <= 1Then
        OutColor := New GxColorClass_2();
        OutColor.CreateHSB(H, S, B);
        Return OutColor;
    Else
        Return Null;
    End If;
End Function;

This function returns the color created in accordance with values of color hue, saturation and brightness.

See also:

GxColor