C# Class LogViewer.Utilities.HlsColor

Mostrar archivo Open project: Dronacharya-Org/Dronacharya Class Usage Examples

Public Methods

Method Description
Darken ( float percent ) : void

Darkens the colour by the specified amount by modifying the luminance (for example, 0.2 would darken the colour by 20%)

GetRandomColor ( ) : Color
HlsColor ( ) : System

Constructs a new instance of the class initialised to black.

HlsColor ( Color c ) : System

Constructs an instance of the class from the specified System.Drawing.Color

HlsColor ( HlsColor hls ) : System

Constructs an instance of the class using the settings of another instance.

HlsColor ( byte red, byte green, byte blue ) : System

Constructs an instance of the class with the specified red, green and blue values.

HlsColor ( float hue, float luminance, float saturation ) : System

Constructs an instance of the class with the specified hue, luminance and saturation values.

Lighten ( float percent ) : void

Lightens the colour by the specified amount by modifying the luminance (for example, 0.2 would lighten the colour by 20%)

Private Methods

Method Description
ToHLS ( ) : void
ToRGB ( ) : void
ToRGB1 ( float rm1, float rm2, float rh ) : byte

Method Details

Darken() public method

Darkens the colour by the specified amount by modifying the luminance (for example, 0.2 would darken the colour by 20%)
public Darken ( float percent ) : void
percent float
return void

GetRandomColor() public static method

public static GetRandomColor ( ) : Color
return Color

HlsColor() public method

Constructs a new instance of the class initialised to black.
public HlsColor ( ) : System
return System

HlsColor() public method

Constructs an instance of the class from the specified System.Drawing.Color
public HlsColor ( Color c ) : System
c Color The System.Drawing.Color to use to initialize the /// class
return System

HlsColor() public method

Constructs an instance of the class using the settings of another instance.
public HlsColor ( HlsColor hls ) : System
hls HlsColor
return System

HlsColor() public method

Constructs an instance of the class with the specified red, green and blue values.
public HlsColor ( byte red, byte green, byte blue ) : System
red byte The red component.
green byte The green component.
blue byte The blue component.
return System

HlsColor() public method

Constructs an instance of the class with the specified hue, luminance and saturation values.
If any of the H,L,S /// values are out of the acceptable range (0.0-360.0 for Hue and 0.0-1.0 /// for Luminance and Saturation)
public HlsColor ( float hue, float luminance, float saturation ) : System
hue float The Hue (between 0.0 and 360.0)
luminance float The Luminance (between 0.0 and 1.0)
saturation float The Saturation (between 0.0 and 1.0)
return System

Lighten() public method

Lightens the colour by the specified amount by modifying the luminance (for example, 0.2 would lighten the colour by 20%)
public Lighten ( float percent ) : void
percent float
return void