IDS peak ICV v1.6.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

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

◆ 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

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

Field Documentation

◆ g

ushort ushort g

◆ r

ushort r

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

Since
IDSImaging.Peak.ICV 1.3

Property Documentation

◆ Blue

ushort Blue
get

The blue value.

Since
IDSImaging.Peak.ICV 1.3

◆ ColorCode

ulong ColorCode
get

The color code.

Since
IDSImaging.Peak.ICV 1.3

◆ Comparer

IEqualityComparer<Color> Comparer = new ColorEqualityComparer()
staticget

A default equality comparer for comparing Color data values.

Since
IDSImaging.Peak.ICV 1.3

◆ Green

ushort Green
get

The green value.

Since
IDSImaging.Peak.ICV 1.3

◆ Red

ushort Red
get

The red value.

Since
IDSImaging.Peak.ICV 1.3

◆ RGB

ushort ushort ushort b RGB
get