Skip to content
v2.273.0

Color Class ​

A set of standard colours that can be used in annotations in a GraphWidget.

Example ​

ts
declare const dashboard: cloudwatch.Dashboard;

dashboard.addWidgets(new cloudwatch.GraphWidget({
  // ...

  leftAnnotations: [
    { value: 1800, label: Duration.minutes(30).toHumanString(), color: cloudwatch.Color.RED, },
    { value: 3600, label: '1 hour', color: '#2ca02c', }
  ],
  verticalAnnotations: [
    { date: '2022-10-19T00:00:00Z', label: 'Deployment', color: cloudwatch.Color.RED, }
  ]
}));

Properties ​

BLUEstringbluestrBLUEStringBLUEstringBLUE*stringrequiredstatic#
blue - hex #1f77b4.
BROWNstringbrownstrBROWNStringBROWNstringBROWN*stringrequiredstatic#
brown - hex #8c564b.
GREENstringgreenstrGREENStringGREENstringGREEN*stringrequiredstatic#
green - hex #2ca02c.
GREYstringgreystrGREYStringGREYstringGREY*stringrequiredstatic#
grey - hex #7f7f7f.
ORANGEstringorangestrORANGEStringORANGEstringORANGE*stringrequiredstatic#
orange - hex #ff7f0e.
PINKstringpinkstrPINKStringPINKstringPINK*stringrequiredstatic#
pink - hex #e377c2.
PURPLEstringpurplestrPURPLEStringPURPLEstringPURPLE*stringrequiredstatic#
purple - hex #9467bd.
REDstringredstrREDStringREDstringRED*stringrequiredstatic#
red - hex #d62728.