Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Theme parameters

This page documents the keys supported in a Surfer theme file.

You only need to include the keys you want to override. Any omitted value falls back to the selected base theme or, for a full theme file, the built-in defaults.

For a complete example, see the default theme.

Value formats

  • Colors use RGB hex and may optionally start with #, for example "d4d4d4" or "#d4d4d4".
  • Three-digit hex like "abc" or "#abc" is also accepted and expanded to "aabbcc".
  • Widths, lengths, and similar numeric values are non-negative. Negative values are clamped to 0.
  • Opacity-like values are clamped to the range 0..1.

Example

foreground = "d4d4d4"
border_color = "282b2d"
highlight_background = "37485E"
cursor = { color = "b63935", width = 2 }

canvas_colors = { background = "0b151d", alt_background = "1b252d", foreground = "d4d4d4" }
primary_ui_color = { background = "171717", foreground = "d4d4d4" }
selected_elements_colors = { background = "444444", foreground = "d4d4d4" }

[colors]
Green = "6a9955"
Red = "f44747"

[ticks]
density = 1.0
style = { color = "222222", width = 2 }

Top-level parameters

KeyTypeDescription
foregroundcolorDefault foreground text color used across the UI.
border_colorcolorBorder color between UI elements.
alt_text_colorcolorAlternate text color. Often when an explicit background color is used, the color with most contrast is chosen between foreground and this.
canvas_colorsThemeColorTripleColors for the waveform canvas.
primary_ui_colorThemeColorPairMain UI background and foreground colors.
secondary_ui_colorThemeColorPairSecondary UI colors, used for panels, lists, and inputs.
selected_elements_colorsThemeColorPairColors used for selected items in the UI.
accent_infoThemeColorPairInformational accent colors.
accent_warnThemeColorPairWarning accent colors.
accent_errorThemeColorPairError accent colors.
cursorSurferLineStyleStyle used to draw the main cursor and marker vertical lines.
gestureSurferLineStyleStyle used for mouse gesture lines.
measureSurferLineStyleStyle used for measurement lines.
clock_highlight_lineSurferLineStyleLine style used when clock highlighting is in Line mode.
clock_highlight_line_colorslist of colorsAdditional per-clock colors used for clock highlighting in Line mode. In multi-clock views, the effective repeating cycle is clock_highlight_line.color followed by this list, then wrapped by clock index.
clock_highlight_cyclecolorFill color used when clock highlighting is in Cycle mode.
clock_highlight_cycle_colorslist of colorsAdditional per-clock colors used when clock highlighting is in Cycle mode. In multi-clock views, the effective repeating cycle is clock_highlight_cycle followed by this list, then wrapped by clock index.
clock_rising_markerbooleanDraw arrows on rising clock edges.
variable_defaultcolorDefault waveform color for regular signals.
variable_highimpcolorColor used for high-impedance (Z) signal segments.
variable_undefcolorColor used for undefined (X) signal segments.
variable_dontcarecolorColor used for don’t-care signal segments.
variable_weakcolorColor used for weak-signal segments.
variable_parametercolorColor used for parameter/constant values.
variable_eventcolorColor used for event variables.
transaction_defaultcolorDefault color for transaction streams.
relation_arrowSurferRelationArrowStyle used for transaction relation arrows.
waveform_opacitynumber 0..1Background opacity for waveform rows.
wide_opacitynumber 0..1Background opacity for wide signals.
colorstable of named colorsNamed colors exposed in UI commands such as item_set_color.
highlight_backgroundcolorBackground highlight color used for focused or emphasized rows/elements.
linewidthnon-negative numberStandard waveform line width.
thick_linewidthnon-negative numberThicker waveform line width for emphasized signals.
vector_transition_widthnon-negative numberMaximum width of vector transition markers.
alt_frequencyintegerNumber of rows using the normal canvas background before alternating to alt_background. Set to 0 to disable alternating backgrounds.
viewport_separatorSurferLineStyleStyle of the separator between viewports.
drag_hint_colorcolorColor of drag hint guides.
drag_hint_widthnon-negative numberWidth of drag hint guides.
drag_thresholdnon-negative numberThreshold before drag hints or drag behavior activate.
ticksSurferTicksTick line density and style.
scope_iconsScopeIconsOptional icon overrides for scope types in the hierarchy.
variable_iconsVariableIconsOptional icon overrides for variable types in the hierarchy.

theme_names exists internally in the theme data model but is populated by Surfer itself and should not be set in a theme file.

Named colors

The [colors] table defines the color names available to commands like item_set_color and item_set_background_color.

Example:

[colors]
Green = "6a9955"
Red = "f44747"
Blue = "569cd6"

Each key is an arbitrary user-visible color name and each value is a hex RGB color (with or without a leading #).

Structured types

ThemeColorPair

Used by primary_ui_color, secondary_ui_color, selected_elements_colors, accent_info, accent_warn, and accent_error.

primary_ui_color = { background = "171717", foreground = "d4d4d4" }
FieldTypeDescription
backgroundcolorBackground color.
foregroundcolorForeground/text color.

ThemeColorTriple

Used by canvas_colors.

canvas_colors = { background = "0b151d", alt_background = "1b252d", foreground = "d4d4d4" }
FieldTypeDescription
backgroundcolorPrimary waveform canvas background.
alt_backgroundcolorAlternating background used every alt_frequency rows.
foregroundcolorText color used on the canvas.

SurferLineStyle

Used by cursor, gesture, measure, clock_highlight_line, and viewport_separator.

cursor = { color = "b63935", width = 2 }
FieldTypeDescription
colorcolorLine color.
widthnon-negative numberLine width.

SurferTicks

Used by ticks.

[ticks]
density = 1.0
style = { color = "222222", width = 2 }
FieldTypeDescription
densitynumber 0..1Tick density. 1 means as many ticks as can fit without overlap.
styleSurferLineStyleTick line style.

SurferRelationArrow

Used by relation_arrow.

[relation_arrow]
style = { color = "c61521", width = 1.3 }
head_angle = 25
head_length = 8
FieldTypeDescription
styleSurferLineStyleArrow line style.
head_anglenon-negative numberArrowhead angle in degrees.
head_lengthnon-negative numberArrowhead length.

Icon customization

Themes can override both the glyph and the color for scope and variable icons shown in the hierarchy view.

Icon values are Unicode strings, typically copied from the Remix Icon set used by Surfer.

ScopeIcons

Use a [scope_icons] table to override glyphs for scope-like hierarchy nodes.

Supported keys are:

  • module
  • task
  • function
  • begin
  • fork
  • generate
  • struct
  • union
  • class
  • interface
  • package
  • program
  • vhdl_architecture
  • vhdl_procedure
  • vhdl_function
  • vhdl_record
  • vhdl_process
  • vhdl_block
  • vhdl_for_generate
  • vhdl_if_generate
  • vhdl_generate
  • vhdl_package
  • ghw_generic
  • vhdl_array
  • unknown
  • clocking
  • sv_array

Example:

[scope_icons]
module = "\ued52"
function = "\ued9e"
package = "\ued88"

scope_icons.colors

The nested [scope_icons.colors] table accepts the same keys as [scope_icons], but each value is a color instead of a glyph.

[scope_icons.colors]
module = "4FC3F7"
function = "BA68C8"
package = "FFD54F"

VariableIcons

Use a [variable_icons] table to override glyphs for variable categories.

Supported keys are:

  • wire
  • bus
  • string
  • event
  • other

Example:

[variable_icons]
wire = "\uf035"
bus = "\uebad"
string = "\uf201"
event = "\ueea8"
other = "\uedfc"

variable_icons.colors

The nested [variable_icons.colors] table accepts the same keys as [variable_icons], but each value is a color.

[variable_icons.colors]
wire = "81C784"
bus = "64B5F6"
string = "FFB74D"
event = "F06292"
other = "BA68C8"

Notes

  • A theme file may define only a subset of keys when it is intended to override an existing theme.
  • The colors table is separate from UI palette settings; it exists so commands can refer to stable names like Green or Orange.
  • Icon color tables are optional. If omitted, Surfer uses built-in defaults for icon colors.