YOUSEFUL / DELPHI / COMPONENTS

TAtlasTheme

A named palette of surface, alternate, primary and text colours, returned by AtlasTheme.

Record Unit Atlas.Themes · Product Atlas VCL

Description

AtlasTheme(Index) returns palette Index (0 to AtlasThemeCount - 1; other values raise EArgumentOutOfRangeException). Use it to colour your own drawing consistently with TAtlasThemer. The ten light palettes have Surface = clWhite, Alternate = $00F4F4F4 and Text = $00232323; Midnight (index 10) has Surface = $002D241B, Alternate = $003B3024 and Text = $00F0F0F0. The primary colours are Harbor $003D2C1E, Forest $0029471B, Plum $004D2543, Slate $00433730, Copper $001E335A, Indigo $00572D26, Ocean $00524214, Wine $00212763, Olive $001C3D3C, Graphite $00333333 and Midnight $00241810 (Delphi TColor values, blue-green-red).

Members

MemberKindWhat it does
NamefieldDisplay name; also what TAtlasThemer.SaveToFile writes.
SurfacefieldBackground given to every themed control.
AlternatefieldAlternate grid rows, grid fixed cells and diagram nodes.
PrimaryfieldGrid header and action tile background; draw white text on it.
TextfieldFont colour given to every themed control.

Fields

Name field

Name: string;

Display name; also what TAtlasThemer.SaveToFile writes.

Surface field

Surface, Alternate, Primary, Text: TColor;

Background given to every themed control.

Alternate field

Surface, Alternate, Primary, Text: TColor;

Alternate grid rows, grid fixed cells and diagram nodes.

Primary field

Surface, Alternate, Primary, Text: TColor;

Grid header and action tile background; draw white text on it.

Text field

Surface, Alternate, Primary, Text: TColor;

Font colour given to every themed control.

Examples

Paint a header band in the theme colours

Custom drawing that matches the tiles and grid headers of the same theme.

pascal
uses System.Types, Vcl.Graphics, Atlas.Themes;

procedure PaintBand(Canvas: TCanvas; const Bounds: TRect; ThemeIndex: Integer; const Text: string);
var
  Theme: TAtlasTheme;
begin
  Theme := AtlasTheme(ThemeIndex);
  Canvas.Brush.Color := Theme.Primary;
  Canvas.FillRect(Bounds);
  Canvas.Font.Color := clWhite;
  Canvas.TextOut(Bounds.Left + 8, Bounds.Top + 4, Text);
end;

TAtlasThemer

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer