Class DeviceRgb
Color space to specify colors according to RGB color model.
public class DeviceRgb : Color
- Inheritance
-
DeviceRgb
- Inherited Members
Constructors
DeviceRgb()
Creates DeviceRgb color with all colorants intensities initialised as zeroes.
public DeviceRgb()
DeviceRgb(Color)
Create DeviceRGB color from R, G, B values of System.Drawing.Color
Note, that alpha chanel is ignored, but opacity still can be achieved
in some places by using 'setOpacity' method or 'TransparentColor' class.
public DeviceRgb(Color color)
Parameters
color
Colorthe color which RGB values are used
DeviceRgb(int, int, int)
Creates DeviceRgb color by intensities of red, green and blue colorants.
public DeviceRgb(int r, int g, int b)
Parameters
r
intthe intensity of red colorant
g
intthe intensity of green colorant
b
intthe intensity of blue colorant
Remarks
Creates DeviceRgb color by intensities of red, green and blue colorants. The intensities are considered to be in [0, 255] gap, if not, the intensity will be considered as 255 (when colorant's value is bigger than 255) or 0 (when colorant's value is less than 0).
DeviceRgb(float, float, float)
Creates DeviceRgb color by intensities of red, green and blue colorants.
public DeviceRgb(float r, float g, float b)
Parameters
r
floatthe intensity of red colorant
g
floatthe intensity of green colorant
b
floatthe intensity of blue colorant
Remarks
Creates DeviceRgb color by intensities of red, green and blue colorants. The intensities are considered to be in [0, 1] interval, if not, the intensity will be considered as 1 (when colorant's value is bigger than 1) or 0 (when colorant's value is less than 0).
Fields
BLACK
Predefined black DeviceRgb color
public static readonly Color BLACK
Field Value
BLUE
Predefined blue DeviceRgb color
public static readonly Color BLUE
Field Value
GREEN
Predefined green DeviceRgb color
public static readonly Color GREEN
Field Value
RED
Predefined red DeviceRgb color
public static readonly Color RED
Field Value
WHITE
Predefined white DeviceRgb color
public static readonly Color WHITE
Field Value
Methods
MakeDarker(DeviceRgb)
Returns DeviceRgb color which is darker than given one
public static DeviceRgb MakeDarker(DeviceRgb rgbColor)
Parameters
rgbColor
DeviceRgbthe DeviceRgb color to be made darker
Returns
- DeviceRgb
darker color
MakeLighter(DeviceRgb)
Returns DeviceRgb color which is lighter than given one
public static DeviceRgb MakeLighter(DeviceRgb rgbColor)
Parameters
rgbColor
DeviceRgbthe DeviceRgb color to be made lighter
Returns
- DeviceRgb
lighter color