C# Class LitDev.LDColours

Show file Open project: litdev1/LitDev Class Usage Examples

Public Methods

Method Description
GetBlue ( Primitive colour ) : Primitive

Get the Blue component of a colour.

GetGreen ( Primitive colour ) : Primitive

Get the Green component of a colour.

GetHue ( Primitive colour ) : Primitive

Get the Hue component of a colour.

GetLightness ( Primitive colour ) : Primitive

Get the Lightness component of a colour.

GetOpacity ( Primitive colour ) : Primitive

Get the Opacity component of a colour.

GetRed ( Primitive colour ) : Primitive

Get the Red component of a colour.

GetSaturation ( Primitive colour ) : Primitive

Get the Saturation component of a colour.

HSL2RGB ( double H, double S, double L ) : double[]
HSLtoRGB ( Primitive H, Primitive S, Primitive L ) : Primitive

Convert a Hue, Saturation, Lightness (HSL) color to a Red, Green, Blue (RGB) colour used by SmallBasic.

RGB2HSL ( double R, double G, double B ) : double[]
SetOpacity ( Primitive colour, Primitive opacity ) : Primitive

Modify the opacity of a colour.

Private Methods

Method Description
GetPixel ( Primitive x, Primitive y ) : Primitive

Method Details

GetBlue() public static method

Get the Blue component of a colour.
public static GetBlue ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

GetGreen() public static method

Get the Green component of a colour.
public static GetGreen ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

GetHue() public static method

Get the Hue component of a colour.
public static GetHue ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

GetLightness() public static method

Get the Lightness component of a colour.
public static GetLightness ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

GetOpacity() public static method

Get the Opacity component of a colour.
public static GetOpacity ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

GetRed() public static method

Get the Red component of a colour.
public static GetRed ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

GetSaturation() public static method

Get the Saturation component of a colour.
public static GetSaturation ( Primitive colour ) : Primitive
colour Primitive The colour to get the component from.
return Primitive

HSL2RGB() public static method

public static HSL2RGB ( double H, double S, double L ) : double[]
H double
S double
L double
return double[]

HSLtoRGB() public static method

Convert a Hue, Saturation, Lightness (HSL) color to a Red, Green, Blue (RGB) colour used by SmallBasic.
public static HSLtoRGB ( Primitive H, Primitive S, Primitive L ) : Primitive
H Primitive Hue (0 to 360).
S Primitive Saturation (0 to 1).
L Primitive Lightness (0 to 1).
return Primitive

RGB2HSL() public static method

public static RGB2HSL ( double R, double G, double B ) : double[]
R double
G double
B double
return double[]

SetOpacity() public static method

Modify the opacity of a colour.
public static SetOpacity ( Primitive colour, Primitive opacity ) : Primitive
colour Primitive The colour to modify.
opacity Primitive The opacity (0 to 255).
return Primitive