Class: ColorBrewer

mcutils.control. ColorBrewer

Color brewer control


new ColorBrewer(options, target [, size], colors)

Parameters:
Name Type Argument Default Description
options Object
target Element

element to place in

size number <optional>
5

color size

colors Array.<string>

a list of color to initialize

Source:
control/ColorBrewer.js

Extends

  • ol_Object

Members


<static> types

Color brewer types

Source:
control/ColorBrewer.js

Methods


getColors()

Get current colors in the brewer

Source:
control/ColorBrewer.js
Returns:

a list of colors

Type
Array.<string>

getScheme()

Get the current scheme

Source:
control/ColorBrewer.js
Returns:

scheme

Type
string

selectColor(c)

Select a color

Parameters:
Name Type Description
c number

color index (manual mode)

Source:
control/ColorBrewer.js

setColors(colors)

Set current colors in the brewer

Parameters:
Name Type Description
colors Array.<string>
Source:
control/ColorBrewer.js

setScheme(scheme)

Set the current scheme

Parameters:
Name Type Description
scheme string
Source:
control/ColorBrewer.js

setSize(size)

Set color size

Parameters:
Name Type Description
size number
Source:
control/ColorBrewer.js

setType(type)

Set brewer type

Parameters:
Name Type Description
type string
Source:
control/ColorBrewer.js