Skip to main content

Choose a Coloring Mode

The Gantt supports two coloring modes that determine how task bar colors are applied:
ModeHow It WorksColor PropertyUse When
StaticAll progress-based coloring is disabled; you set every color manually via Item Scripttask.colorYou want complete control over every task bar color
DynamicProgress-based colors (overdue, delayed, on-track, resolved) are applied automatically; you can override only the default blue colortask.taskColorYou want schedule-status awareness with selective customization
diagram

Option 1: Static Coloring

Disable all progress-based colors and assign colors entirely through Item Scripts. Add to Widget Properties > Advanced > Gantt Config Script:
gantt.config.show_progress_colors = false;
Then add to Widget Properties > Advanced > Item Script:
if (wi.getType().getId() === "workpackage" && wi.getStatus().getId() === "draft") {
  task.color = "#bfbfbf";
}
In static mode, use task.color to set the task bar color. This property overrides all automatic coloring, giving you full control.
Milestone colors are hardcoded to yellow and red (for passed deadlines) unless static coloring is enabled. To apply custom colors to milestones, you must set gantt.config.show_progress_colors = false and then assign colors via task.color in the Item Script.

Option 2: Dynamic Coloring

Keep progress-based status colors active while customizing specific aspects. To change the default blue color for on-track items, add to Widget Properties > Advanced > Item Script:
if (wi.getType().getId() === "portfolioepic") {
  task.taskColor = "#bfbfbf";
}
In dynamic mode, use task.taskColor to change only the default (blue) color. Items that are overdue, delayed, or resolved retain their progress-based colors regardless of task.taskColor.
Using task.color in dynamic mode overrides all progress-based coloring for that item. Use task.taskColor instead if you want to change only the default color while keeping overdue/delayed/resolved status colors active. Using task.color when progress colors are enabled effectively forces that item into static coloring.

Customize Progress Color Defaults

Override the default progress colors at the project or server level. Add the following under Administration > Configuration Properties:
nextedy.gantt.default.progress_color_overdue=red
nextedy.gantt.default.progress_color_progressdue=orange
nextedy.gantt.default.progress_color_resolved=gray
nextedy.gantt.workitems.unplanned_color=#c7cffb
nextedy.gantt.workitems.unplanned_color_fg=#001379
Alternatively, set these per-widget in the Gantt Config Script:
gantt.config.progress_color_overdue = "red";
gantt.config.progress_color_progressdue = "orange";
gantt.config.progress_color_resolved = "gray";
Both named colors (red, green, gray) and HEX color codes (#bfbfbf, #0AA33A) are supported in all color properties. Use HEX codes for precise color matching across your project.

Verify

You should now see that task bars display colors according to your chosen mode. In static mode, all bars use the colors assigned in the Item Script. In dynamic mode, overdue items appear in your configured overdue color, delayed items in the progress-due color, and on-track items in either the default blue or your custom task.taskColor value.

See Also

KB ArticlesSupport TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/Aresource-view/ganttMarkersColorConfigValidation.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/default.json
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/view/resourceAllocation.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/view/markersStyles.cy.ts