---
title: "Colormap"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

Colormap for mapping scalar values within a given range to a color.

This provides a number of popular pre-defined colormaps.
In the future, the Rerun Viewer will allow users to define their own colormaps,
but currently the Viewer is limited to the types defined here.

## Variants
#### `Grayscale` = 1
A simple black to white gradient.

This is a sRGB gray gradient which is perceptually uniform.

#### `Inferno` = 2
The Inferno colormap from Matplotlib.

This is a perceptually uniform colormap.
It interpolates from black to red to bright yellow.

#### `Magma` = 3
The Magma colormap from Matplotlib.

This is a perceptually uniform colormap.
It interpolates from black to purple to white.

#### `Plasma` = 4
The Plasma colormap from Matplotlib.

This is a perceptually uniform colormap.
It interpolates from dark blue to purple to yellow.

#### `Turbo` = 5
Google's Turbo colormap map.

This is a perceptually non-uniform rainbow colormap addressing many issues of
more traditional rainbow colormaps like Jet.
It is more perceptually uniform without sharp transitions and is more colorblind-friendly.
Details: <https://research.google/blog/turbo-an-improved-rainbow-colormap-for-visualization/>

#### `Viridis` = 6
The Viridis colormap from Matplotlib

This is a perceptually uniform colormap which is robust to color blindness.
It interpolates from dark purple to green to yellow.

#### `CyanToYellow` = 7
Rasmusgo's Cyan to Yellow colormap

This is a perceptually uniform colormap which is robust to color blindness.
It is especially suited for visualizing signed values.
It interpolates from cyan to blue to dark gray to brass to yellow.

#### `Spectral` = 8
The Spectral colormap from Matplotlib.

This is a diverging colormap, often used to visualize data with a meaningful center point,
where deviations from that center are important to highlight.
It interpolates from red to orange to yellow to green to blue to violet.

#### `Twilight` = 9
The Twilight colormap from Matplotlib.

This is a perceptually uniform cyclic colormap from Matplotlib, it is useful for
visualizing periodic or cyclic data.

It interpolates from white to blue to purple to red to orange and back to white.

#### `RvizMap` = 10
The classic `RViz` "Map" grid-map colormap intended for occupancy-style SLAM grid maps.

Known values are mapped to a grayscale ramp from white (free) to black (occupied),
unknown values are in a green-blue color. Special / illegal values have highlight colors.

#### `RvizCostmap` = 11
The classic `RViz` "Costmap" grid-map colormap for robot navigation cost maps.

Cost values are mapped to blue to red spectrum, and special cost values
(e.g. lethal obstacles) have highlight colors. Zero values are fully transparent.


## Arrow datatype
```
UInt8
```

## API reference links
 * 🌊 [C++ API docs for `Colormap`](https://ref.rerun.io/docs/cpp/stable/namespacererun_1_1components.html)
 * 🐍 [Python API docs for `Colormap`](https://ref.rerun.io/docs/python/stable/common/components#rerun.components.Colormap)
 * 🦀 [Rust API docs for `Colormap`](https://docs.rs/rerun/latest/rerun/components/enum.Colormap.html)


## Used by

* [`DepthImage`](../archetypes/depth_image.md)
* [`EncodedDepthImage`](../archetypes/encoded_depth_image.md)
* [`GridMap`](../archetypes/grid_map.md)
* [`VoxelGridMap`](../archetypes/voxel_grid_map.md)
