IDS peak ICV v1.5.0
Loading...
Searching...
No Matches
ColorPalette Class Reference
Inheritance diagram for ColorPalette:

Public Member Functions

 ColorPalette (params Color[] colors)
 Creates a color palette from the given colors.
 
 ColorPalette (ColorPaletteConstant constant, byte numBitsPerPixel=8)
 Creates a color palette from a color palette constant.
 
 new (int r, int g, int b) RGB
 The next color of the palette as a tuple with the red, green and blue values.
 
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 a color palette (a set of colors).

This class cycles through a predefined list of colors.

Since
IDSImaging.Peak.ICV 1.3

Constructor & Destructor Documentation

◆ ColorPalette() [1/2]

ColorPalette ( params Color[] colors)
inline

Creates a color palette from the given colors.

Parameters
colorsAn array of Color objects.
Exceptions
IcvNotPossibleExceptionNo colors are provided.
Since
IDSImaging.Peak.ICV 1.3

◆ ColorPalette() [2/2]

ColorPalette ( ColorPaletteConstant constant,
byte numBitsPerPixel = 8 )
inline

Creates a color palette from a color palette constant.

The colors in the palette are:

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

Member Function Documentation

◆ new()

new ( int r,
int g,
int b )
inline

The next color of the palette as a tuple with the red, green and blue values.

Since
IDSImaging.Peak.ICV 1.3

◆ ToString()

override string ToString ( )
inlineinherited

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
inherited

◆ r

ushort r
inherited

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

Since
IDSImaging.Peak.ICV 1.3

Property Documentation

◆ Blue

ushort Blue
getinherited

The blue value.

Since
IDSImaging.Peak.ICV 1.3

◆ ColorCode

ulong ColorCode
getinherited

The color code.

Since
IDSImaging.Peak.ICV 1.3

◆ Comparer

IEqualityComparer<Color> Comparer = new ColorEqualityComparer()
staticgetinherited

A default equality comparer for comparing Color data values.

Since
IDSImaging.Peak.ICV 1.3

◆ Green

ushort Green
getinherited

The green value.

Since
IDSImaging.Peak.ICV 1.3

◆ Red

ushort Red
getinherited

The red value.

Since
IDSImaging.Peak.ICV 1.3

◆ RGB

ushort ushort ushort b RGB
getinherited