# Interface ColorInfoJson

The colorInfo visual variable defines how a continuous color ramp is applied to features based on the values of a numeric field attribute. The minimum and maximum values of the data should be indicated along with their respective color values. You must specify either colors or stops to construct the color ramp.

See https://developers.arcgis.com/web-map-specification/objects/colorInfo_visualVariable/ https://developers.arcgis.com/web-scene-specification/objects/colorInfo_visualVariable/.

interface ColorInfoJson {
colors?: ColorJson[];
field: string;
legendOptions?: {
showLegend?: boolean;
title?: string;
};
maxDataValue?: number;
minDataValue?: number;
normalizationField?: string;
stops?: ColorStopJson[];
type: "colorInfo";
}

#### Hierarchy (view full)

- VisualVariableJsonBase
  - ColorInfoJson

#####
Index

### Properties

colors?
field
legendOptions?
maxDataValue?
minDataValue?
normalizationField?
stops?
type

##
Properties

### `Optional` colors

colors?: ColorJson[]

An array of colors that define the color ramp. Either colors or stops must be specified to construct the color ramp.

### field

field: string

A string value indicating the name of the feature attribute field that contains the data value to render.

Inherited from VisualVariableJsonBase.field

### `Optional` legendOptions

legendOptions?: {
showLegend?: boolean;
title?: string;
}

Options available for the legend. See https://developers.arcgis.com/web-map-specification/objects/legendOptions/ https://developers.arcgis.com/web-scene-specification/objects/legendOptions/.

#### Type declaration

- ##### `Optional` showLegend?: boolean

  Indicates whether to show color/size ramp in the legend.

- ##### `Optional` title?: string

  The title of the legend.

Inherited from VisualVariableJsonBase.legendOptions

### `Optional` maxDataValue

maxDataValue?: number

The maximum data value.

### `Optional` minDataValue

minDataValue?: number

The minimum data value.

### `Optional` normalizationField

normalizationField?: string

String value indicating the name of the attribute field used to normalize the data.

Overrides VisualVariableJsonBase.normalizationField

### `Optional` stops

stops?: ColorStopJson[]

An array of stop objects.

### type

type

The type of the VisualVariable.

Overrides VisualVariableJsonBase.type