File: settings_startup_script.py

package info (click to toggle)
napari 0.7.0~a3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 16,320 kB
  • sloc: python: 113,797; xml: 72; sh: 47; makefile: 43
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)