Skip to content

riskBackgroundColor

The riskBackgroundColor function returns a cell background color style object based on the risk severity level for use in Word documents.

{riskLevel | riskBackgroundColor}
  • input (string): The risk level - one of: “Critical”, “High”, “Medium”, “Low”, “Informational”

An object with cellBackground property containing the hex color code, or undefined if input doesn’t match

Risk LevelBackground Color
Critical#000000 (Black)
High#ff0000 (Red)
Medium#ffc000 (Orange)
Low#00b050 (Green)
Informational#ffffff (White)
{"High" | riskBackgroundColor}
// Returns: { cellBackground: "#ff0000" }
{vulnerability.severity | riskBackgroundColor}
// Returns appropriate background color for vulnerability severity
{"Critical" | riskBackgroundColor}
// Returns: { cellBackground: "#000000" }
{assessment.overallRisk | riskBackgroundColor}
// Applies color based on overall risk assessment
  • Risk matrices in Word documents
  • Vulnerability severity highlighting in tables
  • Executive summary risk indicators
  • Color-coded security dashboards
  • Compliance status reporting with visual indicators