Color Panel component for Delphi
Download Demo with Source Code. It is FREE!
Download for Free: mcColorsDemo.zip (24KB)
Demo package includes
- Manual in HTML file (is what you currently read);
- Source code of the sample project,
- FREE — full source code of the component,
Component feature overview
- mcColorPanel is a compact color palette panel. It is consists of 4 areas (from top to bottom):
- The Color Test Spot, painted with currently selected color
- Palette of Microsoft Office-like color cells
- Color hexagon with Blackness control
- Grayscale palette
- Keyboard Control:
- Select next area: Ctrl + Right Arrow
- Select previous area: Ctrl + Left Arrow
- Select next color cell: Right Arrow
- Select previous color cell: Left Arrow
- Increase Blackness: Ctrl + Down Arrow
- Decrease Blackness: Ctrl + Up Arrow
- Finally select color: Ctrl + Enter
- Mouse Control:
- Clicking cell will preview color in the Color Test Spot
- Double clicking any cell (or single clicking the Color Test Spot) will finally select color
- Each color cell provides a popup hint with Color Name (when present),
RGB value and Hex value. The Color Test Spot only displays a Hex color value.
- mcColorPanel completely paint itself and has no child controls.
This makes it possible using it with custom comboboxes as a drop-down control
TdxPopupEdit by DevelopersExpress.com). And of course, it can be simply dropped onto a Form.
- This component have to be installed into the Delphi Component Palette.
Specifies the percentage of color blackness.
From 0% (default) to 100%. Read/Write.
property Blackness: Byte;
Specifies the selected color. Read/Write.
property Color: TColor;
When the selected color is matched to more than one color cell,
these cells are also highlighted. For example, set blackness to 0 and
select white cell (center of the Color hexagon).
At the same time component will automatically select white cell in the
Office-like area and white cell in the Grayscale area.
Occurs when color cell is changed. Read/Write.
property OnChange: TNotifyEvent;
Occurs wnen the color is finally selected. Read/Write.
property OnSelected: TNotifyEvent;