Set theme#
Displays an image and sets the theme to ‘light’.

/home/runner/work/docs/docs/.venv/lib/python3.12/site-packages/napari/_qt/qt_event_loop.py:50: UserWarning: System theme detection requires a Qt6 backend. Please switch to PyQt6 or PySide6 to use it.
theme_type=get_system_theme(),
/home/runner/work/docs/docs/.venv/lib/python3.12/site-packages/napari/_qt/qt_event_loop.py:50: UserWarning: System theme detection requires a Qt6 backend. Please switch to PyQt6 or PySide6 to use it.
theme_type=get_system_theme(),
from skimage import data
import napari
# create the viewer with an image
viewer = napari.Viewer()
layer = viewer.add_image(data.astronaut(), rgb=True, name='astronaut')
# set the theme to 'light'
viewer.theme = 'light'
if __name__ == '__main__':
napari.run()