Colormap

Description

This resource is supported at 10.1 and later.

The colormap resource returns RGB color representation of pixel values. This resource is supported if the hasColormap property of the service is true.

Resource Hierarchy

Colormap

Request parameters

Parameter

Details

f

Description: The response format. The default response format is html.

Values: html | json

Example usage

Example: Return the colormap of an image service.

http://myserver:6080/arcgis/rest/services/LandCover/ImageServer/colormap?f=json

JSON response syntax

{"Colormap" : [
      [<value1>, <red1>, <green1>, <blue1>], //[int, int, int, int]
      [<value2>, <red2>, <green2>, <blue2>]
    ]
}

JSON response example

{
 "colormap": [
  [
   11,
   102,
   140,
   190
  ],
  [
   12,
   255,
   255,
   255
  ]
}

7/5/2017