ImageEn, unit iexColorPalette



TIEColorPalette = class(TCustomControl);


TIEColorPalette displays a color palette and allows selection of a specific color.

Note: You can use clTransparent to include a transparent/alpha value


// Display a color set
ColorPalette1.Colors.text := 'clRed'    + #13#10 +
                             'clYellow' + #13#10 +
                             'clBlue'   + #13#10 +
                             'clWhite'  + #13#10 +
                             'clBlack'  + #13#10 +

// Display colors of an image
ImageEnView1.IO.LoadFromFile( 'C:\Image.jpeg' );
// Convert to 8bit Palette for display
if ImageEnView1.IEBitmap.PixelFormat <> ie8p then
  ImageEnView1.IEBitmap.PixelFormat := ie8p;
IEColorPalette1.AssignPalette( ImageEnView1 );


Demo  Demos\Other\ColorPalette\ColorPalette.dpr
Demo  Demos\ImageAnalysis\Palette\Palette.dpr

Methods and Properties

Published Property  BiDiMode
Published Property  CellSize
Published Property  CellStyle
Public Property  ColCount
Public Property  ExtentX
Public Property  ExtentY
Public Property  GetCellRect
Published Property  HintFormat
Published Property  HorzMargin
Public Property  RowCount
Public Property  ScrollBarParams
Published Property  SortMethod
Published Property  SortOrder
Published Property  TransparentStyle
Published Property  VertMargin
Public Property  ViewX
Public Property  ViewY
Public Property  VisibleRowCount

Color Set
Public Method  AddColor
Public Method  AppendColorLuminancePalette
Public Method  AppendGradientPalette
Public Method  AppendHuePalette
Public Method  AssignPalette
Public Method  Clear
Public Property  ColorCount
Published Property  Colors
Published Property  DefaultColors
Public Method  ExchangeColors
Published Property  MaxColors
Published Property  MinColors
Public Property  Palette

Public Property  IndexAtPos
Public Property  ColorUnderCursor
Public Property  IndexUnderCursor
Published Property  Selectable
Published Property  SelectedColor
Published Property  SelectNearestColor
Public Property  SelectedIndex

Public Method  Create
Public Method  Destroy
Public Method  LoadFromFile
Public Method  SaveToFile


Event  OnCellClick
Event  OnAfterPaintCell
Event  OnColorsChange
Event  OnGetHintText
Event  OnPaintCell
Event  OnSelectedColorChange