Color ramp objects

Overview

This topic discusses JSON representation of color ramp 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:

  • Algorithmic
  • Multipart

Algorithmic color ramp

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

1
2
3
4
5
6
{
  "type": "algorithmic",
  "fromColor": <color>,
  "toColor": <color>,
  "algorithm": <"esriHSVAlgorithm" | "esriCIELabAlgorithm" | "esriLabLChAlgorithm">
}

Multipart color ramp

A multipart color ramp is defined by a list of constituent color ramps.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "type": "multipart",
  "colorRamps": [
    {
      "type": "algorithmic",
      "fromColor": <color>,
      "toColor": <color>,
      "algorithm": <"esriHSVAlgorithm" | "esriCIELabAlgorithm" | "esriLabLChAlgorithm">
      "start": <double>,
      "stop": <double>
    },
    {
      "type": "algorithmic",
      "fromColor": <color>,
      "toColor": <color>,
      "algorithm": <"esriHSVAlgorithm" | "esriCIELabAlgorithm" | "esriLabLChAlgorithm">
      "start": <double>,
      "stop": <double>
    }
  ]
}

Keep in mind the following for the properties above:

  • A multipart color ramp supports only the algorithmic color ramp.
  • A multipart color ramp supports the algorithmic color ramps with customized start and stop properties, which used percentages. These are optional parameters. Without using them, sub-colorramp will be evenly distributed in the colorRamps array’s order.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close