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
 *                    $color.myFunction()
 * --------------------------------------------------------
 */
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 object base on input.

Accepts parameters in CSS hex or rgb/rtba strings, or hex numbers.

  • "#f00"
  • "#ff0000"
  • "rgb(255, 0, 0)"
  • "rgba(255, 0, 0, 1)"
  • 0xff0000