C# Class AForge.Imaging.HSL

HSL components
显示文件 Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Properties

Property Type Description
Hue int
Luminance float
Saturation float

Public Methods

Method Description
FromRGB ( RGB rgb ) : HSL

Convert from RGB to HSL color space.

FromRGB ( RGB rgb, HSL hsl ) : void

Convert from RGB to HSL color space.

See HSL and HSV Wiki for information about the algorithm to convert from RGB to HSL.

HSL ( ) : System

Initializes a new instance of the HSL class.

HSL ( int hue, float saturation, float luminance ) : System

Initializes a new instance of the HSL class.

ToRGB ( ) : RGB

Convert the color to RGB color space.

ToRGB ( HSL hsl, RGB rgb ) : void

Convert from HSL to RGB color space.

Private Methods

Method Description
Hue_2_RGB ( float v1, float v2, float vH ) : float

Method Details

FromRGB() public static method

Convert from RGB to HSL color space.
public static FromRGB ( RGB rgb ) : HSL
rgb RGB Source color in RGB color space.
return HSL

FromRGB() public static method

Convert from RGB to HSL color space.

See HSL and HSV Wiki for information about the algorithm to convert from RGB to HSL.

public static FromRGB ( RGB rgb, HSL hsl ) : void
rgb RGB Source color in RGB color space.
hsl HSL Destination color in HSL color space.
return void

HSL() public method

Initializes a new instance of the HSL class.
public HSL ( ) : System
return System

HSL() public method

Initializes a new instance of the HSL class.
public HSL ( int hue, float saturation, float luminance ) : System
hue int Hue component.
saturation float Saturation component.
luminance float Luminance component.
return System

ToRGB() public method

Convert the color to RGB color space.
public ToRGB ( ) : RGB
return RGB

ToRGB() public static method

Convert from HSL to RGB color space.
public static ToRGB ( HSL hsl, RGB rgb ) : void
hsl HSL Source color in HSL color space.
rgb RGB Destination color in RGB color space.
return void

Property Details

Hue public_oe property

Hue component.
Hue is measured in the range of [0, 359].
public int Hue
return int

Luminance public_oe property

Luminance value.
Luminance is measured in the range of [0, 1].
public float Luminance
return float

Saturation public_oe property

Saturation component.
Saturation is measured in the range of [0, 1].
public float Saturation
return float