set_background

set_background(fig=None, colour='#ffffff')

Set the background color of the 3D plot.

Supports both direct calls and pipe syntax:

fig = set_background(fig, "black")
fig = ggseg3d() | set_background("black")

Parameters

Name Type Description Default
fig go.Figure | str | None The plotly figure to modify. Can be omitted for pipe syntax. None
colour str Background color as hex string or color name. '#ffffff'

Returns

Name Type Description
go.Figure The modified figure (allows chaining).