Note
Go to the end to download the full example as a Python script or as a Jupyter notebook..
Pass colormaps#
Add named or unnamed vispy colormaps to existing layers.

import numpy as np
from skimage import data
import napari
histo = data.astronaut() / 255
rch, gch, bch = np.transpose(histo, (2, 0, 1))
viewer = napari.Viewer()
rlayer = viewer.add_image(
rch, name='red channel', colormap='red', blending='additive'
)
glayer = viewer.add_image(
gch, name='green channel', colormap='green', blending='additive'
)
blayer = viewer.add_image(
bch, name='blue channel', colormap='blue', blending='additive'
)
if __name__ == '__main__':
napari.run()