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

Definition at line 11 of file ColorPalette.cs.

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

Definition at line 26 of file ColorPalette.cs.

◆ 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

Definition at line 72 of file ColorPalette.cs.

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

Definition at line 102 of file ColorPalette.cs.

◆ 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

Definition at line 180 of file Color.cs.

Field Documentation

◆ g

ushort ushort g
inherited

Definition at line 111 of file Color.cs.

◆ r

ushort r
inherited

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
getinherited

The blue value.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 132 of file Color.cs.

◆ ColorCode

ulong ColorCode
getinherited

The color code.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 105 of file Color.cs.

◆ Comparer

IEqualityComparer<Color> Comparer = new ColorEqualityComparer()
staticgetinherited

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
getinherited

The green value.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 126 of file Color.cs.

◆ Red

ushort Red
getinherited

The red value.

Since
IDSImaging.Peak.ICV 1.3

Definition at line 120 of file Color.cs.

◆ RGB

ushort ushort ushort b RGB
getinherited

Definition at line 111 of file Color.cs.