Skip to main content

Default Dynamic Colors

The following colors are applied automatically when progress coloring is enabled (the default):
ColorConditionMeaning
RedWork item is unresolved AND the end date is in the pastTask is overdue — it should have been completed already
OrangeWork item is unresolved AND the end date is in the future AND current progress is behind scheduleTask is delayed — progress does not match the expected completion rate
BlueWork item is unresolved AND schedule and progress are on trackTask is on track — optimistic schedule and progress alignment
GrayWork item is resolved (completed in Polarion)Task is resolved — no further action required
Light BlueWork item has no scheduled start dateTask is unplanned — start date defaults to today
GreenWork item is configured as a project type via Item ScriptTask is a project item — schedule derived from children
Starting with version 25.10.2, the Gantt chart visually flags tasks in red when the assigned user has no available working days during the scheduled period. This helps planners immediately identify unrealistic schedules caused by calendar conflicts.

Color Decision Flow

diagram

Static vs. Dynamic Coloring

There are two task color properties with different behavior:
PropertyTypeBehaviorUse Case
task.colorStringStatic — overrides ALL colors, including progress-based coloringForce a specific color regardless of task status
task.taskColorStringDynamic — only overrides the default blue colorChange color while preserving red/orange/gray progress indicators
Use task.taskColor when you want to keep progress-based color indicators (red for overdue, orange for delayed, gray for resolved). Use task.color only when you want to force a specific color regardless of progress status.

Disabling Dynamic Colors

To use fully static coloring where only task.color values from the Item Script determine task bar colors, add the following to the Gantt Config Script:
gantt.config.show_progress_colors = false;
When show_progress_colors is set to false, the Gantt chart does not apply the automatic red/orange/blue/gray coloring. Only colors explicitly set via task.color in the Item Script are used.

Script-Based Color Overrides

Color by Type and Status

Use task.color for fully static coloring (requires gantt.config.show_progress_colors=false in the Gantt Config Script): Item Script:
if (wi.getType().getId() === "workpackage" && wi.getStatus().getId() === "draft") {
    var today = new Date();
    if (task.start_date.getTime() < today.getTime()) {
        task.color = "green";
    }
}

Color by Assignee

Use task.taskColor to change the base color while keeping progress indicators: Item Script:
var assignee = null;
var aIterator = wi.getAssignees().iterator();
if (aIterator.hasNext()) {
    assignee = aIterator.next();
    if (assignee && assignee.id === "yourAssigneeId") {
        task.taskColor = "#a9d08e";
    }
}

Highlight Overdue Unresolved Items (Static Mode)

When dynamic colors are off, manually flag overdue items: Gantt Config Script:
gantt.config.show_progress_colors = false;
Item Script:
var tdate = new Date();
var edate = task.end_date;
var interval = tdate.getTime() - edate.getTime();
if (interval > 0) {
    task.color = "red";
}

Resource View Marker Colors

The resource view uses separate color assignments for allocation markers:
CSS ClassDefault ColorCondition
marker_okGreen (#4CAF50)Resource utilization is within capacity
marker_overRed/OrangeResource is over-allocated (load exceeds capacity)
Resource marker colors are configurable through the resourceMarkersColorConfig with colors and percentages arrays that define threshold breakpoints and corresponding color values.
The percentages array must contain numeric values in ascending order. The colors array must be exactly one element longer than the percentages array. Invalid configurations display error messages in both view mode and wiki editor mode.

Marker CSS Classes

Timeline milestone markers receive CSS classes based on their type:
CSS ClassApplied ToDescription
gantt_markerAll markersBase class for all marker elements
todayToday markerApplied to the automatic today-date vertical line
planPlan markersApplied to markers synced from plan boundaries
Named color (e.g., blue)Custom markersApplied when a color is set via setColor()

Configuration Example

A complete setup combining static coloring with custom color logic: Gantt Config Script:
gantt.config.show_progress_colors = false;
Item Script:
if (wi != null) {
    // Color by type
    if (wi.getType().getId() === "workpackage") {
        task.color = "#4472C4";
    } else if (wi.getType().getId() === "feature") {
        task.color = "#70AD47";
    }

    // Override: flag overdue items
    var today = new Date();
    if (task.end_date.getTime() < today.getTime() && wi.getResolution() == null) {
        task.color = "red";
    }
}
KB ArticlesSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Marker.java
  • 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/default.json
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/Aresource-view/item-count.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/view/markersStyles.cy.ts