Class: Color

Highcharts. Color

new Color(input)

Handle color operations. Some object methods are chainable.

Parameters:
Name Type Description
input Highcharts.ColorType

The input color in either rbga or hex format

Methods

brighten(alpha)

Brighten the color instance.

Parameters:
Name Type Description
alpha number

The alpha value.

Returns:
Highcharts.Color .

This color with modifications.

get( [format])

Return the color or gradient stops in the specified format

Parameters:
Name Type Argument Description
format string <optional>

Possible values are 'a', 'rgb', 'rgba' (default).

Returns:
Highcharts.ColorType .

This color as a string or gradient stops.

setOpacity(alpha)

Set the color's opacity to a given alpha value.

Parameters:
Name Type Description
alpha number

Opacity between 0 and 1.

Returns:
Highcharts.Color .

Color with modifications.

tweenTo(to, pos)

Return an intermediate color between two colors.

Parameters:
Name Type Description
to Highcharts.Color

The color object to tween to.

pos number

The intermediate position, where 0 is the from color (current color item), and 1 is the to color.

Returns:
Highcharts.ColorString .

The intermediate color in rgba notation.