C# Класс LogViewer.Utilities.HlsColor

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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%)

Приватные методы

Метод Описание
ToHLS ( ) : void
ToRGB ( ) : void
ToRGB1 ( float rm1, float rm2, float rh ) : byte

Описание методов

Darken() публичный Метод

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
Результат void

GetRandomColor() публичный статический Метод

public static GetRandomColor ( ) : Color
Результат Color

HlsColor() публичный Метод

Constructs a new instance of the class initialised to black.
public HlsColor ( ) : System
Результат System

HlsColor() публичный Метод

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
Результат System

HlsColor() публичный Метод

Constructs an instance of the class using the settings of another instance.
public HlsColor ( HlsColor hls ) : System
hls HlsColor
Результат System

HlsColor() публичный Метод

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.
Результат System

HlsColor() публичный Метод

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)
Результат System

Lighten() публичный Метод

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
Результат void