The Python viewer's appearance — interface theme, background color and toolbar layout — is set through its options object.

Set the theme and appearance options.
viewer = StiViewer()

viewer.options.appearance.theme = enums.StiViewerTheme.OFFICE_2022_BLACK_GREEN
viewer.options.appearance.backgroundColor = 'black'
viewer.options.toolbar.displayMode = enums.StiToolbarDisplayMode.SEPARATED

How it works. The options object drives the viewer's look, so a couple of assignments reskin the entire preview.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.