Skip to content

Color

Type module

Sources

Items from Color can be imported/included and used via following ways.

/**
* Import via: Color.ts
* Access items like: $color.myVariable
*/
import * as $color from "@amcharts/amcharts5/Color";

Variables

Color does not have any variables.

Functions

color(input: number | string)

Returns Color

Returns a new Color from a hex number, or a CSS hex, rgb() or rgba() string (color names such as "red" are not accepted):

  • "#f00"

  • "#ff0000"

  • "rgb(255, 0, 0)"

  • "rgba(255, 0, 0, 1)"

  • 0xff0000