Skip to content

Interlude.Theme.WithColors

In Depth

Theme.WithColors(theme, background: "", foreground: "", surface: "", border: "", error: "")

Replaces individual colours in a theme's palette. Every colour left empty keeps the value it already had.

The inputs are:

  • theme (ThemeDefinition) — The theme to adjust.
  • background (string, defaults to "") — Window backdrop, as hex.
  • foreground (string, defaults to "") — Main text colour, as hex.
  • surface (string, defaults to "") — Panels and cards, as hex.
  • border (string, defaults to "") — Control outlines, as hex.
  • error (string, defaults to "") — Validation colour, as hex.

Returns theme — The adjusted theme.

Search terms: theme, palette, colors, colours, brand, override.


About the Theme nodes

How a form looks. Feed the result into Form.Show's theme port.

A theme is applied to the form's own window and nowhere else. Interlude runs inside Revit and inside Dynamo, and restyling a host application from a package would be an unwelcome surprise no matter how good the styling was.


Example File

An example graph ships beside this page: Interlude.Theme.WithColors.dyn

Theme.WithColors

The form it builds:

Theme.WithColors form