File: settings_startup_script.py

package info (click to toggle)
napari 0.6.6-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,036 kB
  • sloc: python: 112,264; xml: 72; makefile: 44; sh: 5
file content (12 lines) | stat: -rw-r--r-- 455 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
"""Example script for starting napari with a custom colormap

This is an example script that could be provided in napari setting
to be executed on napari application startup.

This script adds a custom colormap named 'cyan_t' to the napari
"""

from napari.utils.colormaps import Colormap, ensure_colormap

custom_cyan_colormap = Colormap(colors=ensure_colormap('cyan').colors, name='cyan_t', low_color=[0, 0, 0, 0])
ensure_colormap(custom_cyan_colormap)