spacr.flowview.theme

Headless visual tokens shared by FlowView renderers.

This module deliberately contains data rather than Qt objects. Static renderers, a future live panel, and documentation examples can therefore use one palette without importing a GUI toolkit.

Functions

node_accent(→ str)

Return the kind accent, reserving alarm red for failed nodes.

state_label(→ str)

Return the non-colour state marker printed on every node card.

Module Contents

spacr.flowview.theme.node_accent(kind: spacr.flowview.model.NodeKind | str, state: spacr.flowview.model.NodeState | str) str[source]

Return the kind accent, reserving alarm red for failed nodes.

Parameters:
  • kind – Input, process, or output role of the node.

  • state – Current execution state of the node.

Returns:

Alarm red for a failed node, otherwise the accent for kind.

Raises:

ValueError – if state is unknown, or if a non-failed node has an unknown kind.

spacr.flowview.theme.state_label(state: spacr.flowview.model.NodeState | str) str[source]

Return the non-colour state marker printed on every node card.

Parameters:

state – Current execution state of the node.

Returns:

Uppercase state label displayed on the node card.

Raises:

ValueError – if state is not a recognised execution state.