You’re viewing outdated documentation. View the latest Graphics Mill documentation.

Color.FromHsl Method

Applies to: Graphics Mill 5.5, 3.x-5.x (may differ) · Archived documentation

Returns RgbColor class instance constructed from hue, saturation, and lightness parameters.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Shared Function FromHsl ( _
	hue As Single, _
	saturation As Single, _
	lightness As Single _
) As RgbColor
C#
public static RgbColor FromHsl(
	float hue,
	float saturation,
	float lightness
)

Parameters

hue

Type: System.Single

The hue parameter. Means the angle at the color wheel, so meaningful values are in range [-1.0, 1.0].
saturation

Type: System.Single

The saturation parameter. It should be in range [-1.0, 1.0].
lightness

Type: System.Single

The lightness parameter. It should be in range [-1.0, 1.0].

Return Value

RgbColor class instance constructed from given HSL parameters.

Examples

Visual Basic
Dim rgb As Aurigma.GraphicsMill.RgbColor = _
 Aurigma.GraphicsMill.Color.FromHsl(0.8F, 0.7F, 0.4F)
C#
Aurigma.GraphicsMill.RgbColor rgb =
    Aurigma.GraphicsMill.Color.FromHsl(0.8F, 0.7F, 0.4F);

See Also

Reference