Color Ramp

A colorRamp object is used to specify a range of colors that are applied to a group of symbols.

Properties

Property Details
algorithm Algorithm used for calculating the ramp.
If property is present, must be one of the following values:
  • esriHSVAlgorithm
  • esriCIELabAlgorithm
  • esriLabLChAlgorithm
colorRamps A multipart color ramp is defined by a list of constituent color ramps.
fromColor Array representing the initial color to start the ramp from.
toColor Array representing the final color to end the ramp with.
type Value indicating the type of colorRamp.
If property is present, must be one of the following values:
  • algorithmic
  • multipart

Algorithmic Example

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

Multipart Example

{
  "colorRamp": {
    "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"
      }
    ]
  }
}

Feedback on this topic?