Item colors provide row-level and cell-level visual indicators in the Risksheet grid based on work item properties, risk parameters, and workflow status.
This page has thin source coverage. The color mechanisms documented below are derived from the risksheet.json configuration sample and the AppConfig.ts source. Additional color options may be available in your Risksheet version. Verify specific color classes and decorator behaviors in your application.
Item colors in Risksheet follow a three-layer architecture. Each layer serves a distinct purpose, and all three work together to produce the final visual appearance of cells and rows.
The following built-in style classes implement a three-tier risk color scheme based on RPN thresholds.
Style Class
RPN Range
Background Color
Text Color
Purpose
.boldCol
All
Inherited
Inherited
Applies font-weight: 600 for bold text emphasis
.rpn1
1 — 150 (low risk)
#eaf5e9 (light green)
#1d5f20 (dark green)
Low-risk visual indicator
.rpn2
151 — 350 (medium risk)
#fff3d2 (light yellow)
#735602 (dark yellow)
Medium-risk visual indicator
.rpn3
> 350 (high risk)
#f8eae7 (light red)
#ab1c00 (dark red)
High-risk visual indicator
All RPN style classes use !important to override default cell styling. This ensures risk color indicators are always visible regardless of other CSS rules that may apply to the cell.
Styles can target specific column group headers by combining row position selectors with header group CSS classes. These styles apply to the column header area, not to data cells.
Style Selector
Background
Text Color
Purpose
.firstRow .headSysReq
rgba(62, 175, 63, 0.12) (light green)
#2A792D
First row of System Requirement column group header
.lastRow .headSysReq
#FFF (white)
#2A792D
Last row of System Requirement column group header
The headSysReq and headFinalRanking classes are applied to column groups via the headerGroupCss property on column definitions. You assign these classes when configuring column groups to enable targeted header styling.
Cell decorators are JavaScript functions that dynamically apply CSS classes to cells based on their current values or the parent item’s properties. They execute each time a cell is rendered, ensuring colors always reflect the current data.
Property
Type
Default
Description
cellDecorators
object
{}
Maps column IDs to JavaScript functions that apply conditional CSS classes to cells
The rpn cell decorator applies risk-level color classes to RPN cells based on value thresholds:
{ "cellDecorators": { "rpn": "function(info){ var val = info.value; $(info.cell).toggleClass('boldCol', true); $(info.cell).toggleClass('rpn1', val>0 && val <= 150); $(info.cell).toggleClass('rpn2', val > 150 && val <= 350); $(info.cell).toggleClass('rpn3', val > 350);}" }}
The rowHeaderRpnNew cell decorator applies the same RPN color scheme to row headers based on the revised (post-mitigation) RPN value stored in the rpnNew field:
{ "cellDecorators": { "rowHeaderRpnNew": "function(info){ var val = info.item['rpnNew']; $(info.cell).toggleClass('rpn1', val>0 && val <= 150); $(info.cell).toggleClass('rpn2', val>0 && val > 150 && val <= 350); $(info.cell).toggleClass('rpn3', val>0 && val > 350);}" }}
Unlike the rpn decorator which uses info.value (the cell’s own value), the rowHeaderRpnNew decorator uses info.item['rpnNew'] to read the revised RPN from the item data. This means the row header color reflects the post-mitigation risk level regardless of which cell triggered the render.
The row header renderer is a named function that controls the visual appearance of the row header column (the leftmost column showing work item identifiers).
Property
Type
Default
Description
headers.rowHeader.renderer
string
See application
Defines the custom renderer function for row headers
The renderer value references a cell decorator by name. In the example above, rowHeaderRpnNew causes each row header to be colored based on the revised RPN value of the corresponding risk item. This gives users an immediate visual summary of risk levels without scanning individual columns.
To connect cell decorators to specific columns, reference the decorator name in your column configuration. The decorator is applied every time a cell in that column is rendered.
The exact column property that references a cell decorator should be verified in your Risksheet version. Check the column configuration section of the Column Type Reference for the decorator binding syntax.
Cell colors applied through styles and cellDecorators have different behaviors across export formats:
Export Format
Color Support
Notes
PDF Export
Supported
Cell formatter processes styles during PDF generation; see PDF Export API
Excel Export
Limited
Some style information transfers; see Compatibility for details
Baseline Comparison
Modified
Comparison mode adds its own color indicators (added/removed/modified) which may override decorator colors
The exact behavior of custom styles in PDF and Excel exports depends on the export script configuration. Colors defined with !important are more likely to be preserved. Check your pdfscript.js for custom export formatting logic.