FRAMES | NO FRAMES
Color Ramp Objects

Overview

This is supported from 10.1 onwards.

This document discusses the JSON colorRamp objects. A colorRamp object is used to specify a range of colors that are applied to a group of symbols.

The following colorRamp definitions are discussed here:

Algorithmic Color Ramp

Algorithmic color ramp is defined by two colors and the algorithm used to traverse the intervening color space between them.

JSON Syntax

{
  "type": "algorithmic",
  "fromColor": <color>,
  "toColor": <color>,
  "algorithm": <"esriHSVAlgorithm" | "esriCIELabAlgorithm" | "esriLabLChAlgorithm">
}

JSON Example

{
  "type": "algorithmic",
  "fromColor": [115,76,0,255],
  "toColor": [255,25,86,255],
  "algorithm": "esriHSVAlgorithm"
}

Multipart Color Ramp

Multipart color ramp is defined by a list of constituent color ramps.

Note:

JSON Syntax

{
  "type": "multipart",
  "colorRamps": [
    {
      "type": "algorithmic",
      "fromColor": <color>,
      "toColor": <color>,
      "algorithm": <"esriHSVAlgorithm" | "esriCIELabAlgorithm" | "esriLabLChAlgorithm">
    },
    {
      "type": "algorithmic",
      "fromColor": <color>,
      "toColor": <color>,
      "algorithm": <"esriHSVAlgorithm" | "esriCIELabAlgorithm" | "esriLabLChAlgorithm">
    }
  ]
}

JSON Example

{
  "type": "multipart",
  "colorRamps": [
    {
      "type": "algorithmic",
      "fromColor": [255,0,0,255],
      "toColor": [255,255,0,255],
      "algorithm": "esriHSVAlgorithm"
    },
    {
      "type": "algorithmic",
      "fromColor": [0,255,255,255],
      "toColor": [0,0,255,255],
      "algorithm": "esriHSVAlgorithm";
    }
  ]
}