IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
Color Class Reference
Inheritance diagram for Color:

Public Member Functions

 Color (byte red, byte green, byte blue, byte numBitsPerPixel=8)
 Creates a color from the given red, green, and blue values.
 
 Color (ColorConstant constant, byte numBitsPerPixel=8)
 Creates a color from a color constant value.
 
override string ToString ()
 Returns a string that represents the Color object.
 

Data Fields

ushort r
 The color as a tuple of red, green and blue values.
 
ushort ushort g
 

Properties

ulong ColorCode [get]
 The color code.
 
ushort ushort ushort b RGB [get]
 
ushort Red [get]
 The red value.
 
ushort Green [get]
 The green value.
 
ushort Blue [get]
 The blue value.
 
static IEqualityComparer< Color > Comparer = new ColorEqualityComparer() [get]
 A default equality comparer for comparing Color data values.
 

Detailed Description

Class holding color codes.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 8 of file Color.cs.

Constructor & Destructor Documentation

◆ Color() [1/2]

Color ( byte red,
byte green,
byte blue,
byte numBitsPerPixel = 8 )
inline

Creates a color from the given red, green, and blue values.

The values must be between 0 and 255 and will be automatically adapted to the given bit range.

Parameters
redRed value.
greenGreen value.
blueBlue value.
numBitsPerPixelNumber of bits per pixel. Defaults to 8.
Exceptions
IcvOutOfRangeExceptionThe specified numBitsPerPixel value is out of range.
Since
IDSImaging.Peak.ICV 1.3

Definition at line 32 of file Color.cs.

◆ Color() [2/2]

Color ( ColorConstant constant,
byte numBitsPerPixel = 8 )
inline

Creates a color from a color constant value.

Parameters
constantA color constant.
numBitsPerPixelNumber of bits per pixel. Defaults to 8.
Exceptions
IcvNotSupportedExceptionAn invalid color constant is provided.
Since
IDSImaging.Peak.ICV 1.3

Definition at line 55 of file Color.cs.

Member Function Documentation

◆ ToString()

override string ToString ( )
inline

Returns a string that represents the Color object.

Returns
A string representation with format "Color(r: {r}, g: {g}, b: {b})".
Since
IDSImaging.Peak.ICV 1.3

Definition at line 180 of file Color.cs.

Field Documentation

◆ g

ushort ushort g

Definition at line 111 of file Color.cs.

◆ r

ushort r

The color as a tuple of red, green and blue values.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 111 of file Color.cs.

Property Documentation

◆ Blue

ushort Blue
get

The blue value.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 132 of file Color.cs.

◆ ColorCode

ulong ColorCode
get

The color code.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 105 of file Color.cs.

◆ Comparer

IEqualityComparer<Color> Comparer = new ColorEqualityComparer()
staticget

A default equality comparer for comparing Color data values.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 138 of file Color.cs.

◆ Green

ushort Green
get

The green value.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 126 of file Color.cs.

◆ Red

ushort Red
get

The red value.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 120 of file Color.cs.

◆ RGB

ushort ushort ushort b RGB
get

Definition at line 111 of file Color.cs.