Metadata: colormaps

Color gradients used for visualizing a data variable.

Schema
{
  "$defs": {
    "Colormap": {
      "additionalProperties": false,
      "description": "A colormap.",
      "properties": {
        "name": {
          "title": "Name",
          "type": "string"
        },
        "colors": {
          "$ref": "#/$defs/ColormapColors"
        }
      },
      "required": [
        "name",
        "colors"
      ],
      "title": "Colormap",
      "type": "object"
    },
    "ColormapColors": {
      "description": "A list of RGB (3-tuple) or RGBA (4-tuple) colors in this colormap.",
      "items": {
        "anyOf": [
          {
            "maxItems": 3,
            "minItems": 3,
            "prefixItems": [
              {
                "type": "integer"
              },
              {
                "type": "integer"
              },
              {
                "type": "integer"
              }
            ],
            "type": "array"
          },
          {
            "maxItems": 4,
            "minItems": 4,
            "prefixItems": [
              {
                "type": "integer"
              },
              {
                "type": "integer"
              },
              {
                "type": "integer"
              },
              {
                "type": "integer"
              }
            ],
            "type": "array"
          }
        ]
      },
      "title": "ColormapColors",
      "type": "array"
    }
  },
  "description": "An index of colormaps by numeric identifier.",
  "patternProperties": {
    "^[0-9]+$": {
      "$ref": "#/$defs/Colormap"
    }
  },
  "title": "ColormapsIndex",
  "type": "object"
}
Example
../static/common/colormaps.json
{
  "0": {
    "name": "Raster not-processed area",
    "colors": [
      [
        0,
        0,
        0,
        0
      ],
      [
        208,
        207,
        212
      ]
    ]
  },
  "1": {
    "name": "colorbrewer 2.0 9-class PuBu (reversed)",
    "colors": [
      [
        2,
        56,
        88
      ],
      [
        4,
        90,
        141
      ],
      [
        5,
        112,
        176
      ],
      [
        54,
        144,
        192
      ],
      [
        116,
        169,
        207
      ],
      [
        166,
        189,
        219
      ],
      [
        208,
        209,
        230
      ],
      [
        236,
        231,
        242
      ],
      [
        255,
        247,
        251
      ]
    ]
  },
  "2": {
    "name": "colorbrewer 2.0 9-class Reds",
    "colors": [
      [
        255,
        245,
        240
      ],
      [
        254,
        224,
        210
      ],
      [
        252,
        187,
        161
      ],
      [
        252,
        146,
        114
      ],
      [
        251,
        106,
        74
      ],
      [
        239,
        59,
        44
      ],
      [
        203,
        24,
        29
      ],
      [
        165,
        15,
        21
      ],
      [
        103,
        0,
        13
      ]
    ]
  },
  "3": {
    "name": "colorbrewer 2.0 9-class Blues",
    "colors": [
      [
        247,
        251,
        255
      ],
      [
        222,
        235,
        247
      ],
      [
        198,
        219,
        239
      ],
      [
        158,
        202,
        225
      ],
      [
        107,
        174,
        214
      ],
      [
        66,
        146,
        198
      ],
      [
        33,
        113,
        181
      ],
      [
        8,
        81,
        156
      ],
      [
        8,
        48,
        107
      ]
    ]
  },
  "4": {
    "name": "colorbrewer 2.0 9-class YlOrRed",
    "colors": [
      [
        255,
        255,
        204
      ],
      [
        255,
        237,
        160
      ],
      [
        254,
        217,
        118
      ],
      [
        254,
        178,
        76
      ],
      [
        253,
        141,
        60
      ],
      [
        252,
        78,
        42
      ],
      [
        227,
        26,
        28
      ],
      [
        189,
        0,
        38
      ],
      [
        128,
        0,
        38
      ]
    ]
  },
  "5": {
    "name": "colorbrewer 2.0 9-class Purples",
    "colors": [
      [
        252,
        251,
        253
      ],
      [
        239,
        237,
        245
      ],
      [
        218,
        218,
        235
      ],
      [
        188,
        189,
        220
      ],
      [
        158,
        154,
        200
      ],
      [
        128,
        125,
        186
      ],
      [
        106,
        81,
        163
      ],
      [
        84,
        39,
        143
      ],
      [
        63,
        0,
        125
      ]
    ]
  },
  "6": {
    "name": "colorbrewer 2.0 9-class YlGnBu (reversed)",
    "colors": [
      [
        8,
        29,
        88
      ],
      [
        37,
        52,
        148
      ],
      [
        34,
        94,
        168
      ],
      [
        29,
        145,
        192
      ],
      [
        65,
        182,
        196
      ],
      [
        127,
        205,
        187
      ],
      [
        199,
        233,
        180
      ],
      [
        237,
        248,
        177
      ],
      [
        255,
        255,
        217
      ]
    ]
  },
  "7": {
    "name": "Balance (diverging)",
    "colors": [
      [
        178,
        24,
        43
      ],
      [
        214,
        96,
        77
      ],
      [
        244,
        165,
        130
      ],
      [
        253,
        219,
        199
      ],
      [
        247,
        247,
        247
      ],
      [
        209,
        229,
        240
      ],
      [
        146,
        197,
        222
      ],
      [
        67,
        147,
        195
      ],
      [
        33,
        102,
        172
      ]
    ]
  },
  "8": {
    "name": "colorbrewer 2.0 9-class Grayscale (reversed)",
    "colors": [
      [
        0,
        0,
        0
      ],
      [
        32,
        32,
        32
      ],
      [
        64,
        64,
        64
      ],
      [
        96,
        96,
        96
      ],
      [
        128,
        128,
        128
      ],
      [
        160,
        160,
        160
      ],
      [
        192,
        192,
        192
      ],
      [
        224,
        224,
        224
      ],
      [
        255,
        255,
        255
      ]
    ]
  }
}