Show / Hide Table of Contents

Method Create

Create(IEnumerable<Color>)

Creates a colormap from a set of colors. Raster value of 0 maps to the first color, with each consecutive value mapping to the next color.

Declaration
public static Colormap Create(IEnumerable<Color> colors)
Parameters
Type Name Description
IEnumerable<Color> colors

An collection of colors.

Returns
Type Description
Colormap

Colormap

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.2 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.3 - 200.8
Xamarin.Android100.0 - 100.14
Xamarin.iOS100.0 - 100.15
UWP100.3 - 200.8

Create(IEnumerable<KeyValuePair<int, Color>>)

Creates a colormap with the specified mapping of raster values to colors.

Declaration
public static Colormap Create(IEnumerable<KeyValuePair<int, Color>> colorMappings)
Parameters
Type Name Description
IEnumerable<KeyValuePair<int, Color>> colorMappings

A dictionary of values with corresponding colors.

Returns
Type Description
Colormap

A new colormap object.

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300
In this article
Provide feedback
Back to top Copyright © 2025 Esri.