Theme-color parameter (@param themecolor)

Created: 2026-07-11 · Updated: 2026-07-11

The themecolor parameter type makes the parameter dialog open a palette picker that shows the Custom Colors configured in PPPTools (the brand / theme-color palette) as swatches. This lets the user quickly pick an approved brand color instead of choosing freely from the whole color space.

Difference from @param color

@param color opens the full Windows color dialog (free RGB choice). @param themecolor shows the Custom Colors as tiles — for brand consistency. A click on "Andere…" in the picker still opens the free dialog when needed.

Custom Colors are maintained under Settings → Custom Colors (see Custom Colors).


Syntax

// @param themecolor <name> "<Label>" [default="#RRGGBB"] [tooltip="…"]
  • default — initial color as #RRGGBB.
  • In the script, Params.GetColor("<name>") returns the chosen color (System.Drawing.Color) — identical to @param color. There is no separate GetThemeColor method; the color comes through GetColor as usual.

Example

// @param themecolor Marke "Brand color" default="#0070C0" tooltip="Pick from the Custom Colors palette"
// @button Apply

var c   = Params.GetColor("Marke");
var sel = ppptools.GetSelectedRange();
for (int i = 1; i <= sel.Count; i++)
    ppptools.SetFill(sel[i], c);

When run, the dialog shows a color button. Clicking it opens the Custom Colors palette; the chosen color appears as a hex value on the button.

Empty palette

If no Custom Colors are defined (yet), the picker shows a hint and the "Andere…" button — so a free choice is still possible.


Which color parameter to use?

Parameter Choice Use
@param color free Windows dialog (any RGB color) when arbitrary colors are needed
@param themecolor Custom Colors palette (+ "Andere…") when brand colors should be picked quickly and consistently