Skip to main content

Static vs. Dynamic Coloring

The Gantt supports two coloring modes that determine how task bar colors are applied:
diagram
Dynamic coloring (default): Task bars display progress-based colors (overdue, progress-due, resolved) that override the default color. Use task.taskColor in the Item Script to change the base color while keeping progress color overrides active. Static coloring: Set gantt.config.show_progress_colors=false in the Gantt Config Script to disable progress-based color overrides. Use task.color in the Item Script to set the final task bar color directly.
In dynamic mode, task.taskColor changes only the default (blue) base color — progress-related colors still override it for overdue or resolved tasks. In static mode, task.color sets the absolute color with no overrides. Mixing them incorrectly produces unexpected results.

Progress Color Properties

These administration properties control the colors applied to task bars based on their scheduling status when dynamic coloring is active: Set these properties in Administration > Configuration Properties to apply globally:
Alternatively, set them per Gantt instance in the Gantt Config Script:

Unplanned Item Colors

Today Marker Color

Resource Marker Colors

The resource view uses color-coded markers to indicate resource allocation levels. The resourceMarkersColorConfig object defines the color scheme:
The colors array must have exactly one more element than the percentages array. The percentages array must contain numeric values in ascending order. Invalid configurations produce error messages in both view mode and the wiki editor.

Marker CSS Classes

The Gantt applies CSS classes to timeline markers based on their type: Custom markers defined without a specific color class receive the base marker styling. You can assign a named CSS color class (e.g., blue) to custom markers to override the default appearance.

Disabling Dynamic Coloring

To use purely static colors without progress-based overrides, add the following to the Gantt Config Script:
Then use task.color in the Item Script to set colors based on your custom logic:

CSS-Based Styling

You can apply custom CSS styles to Gantt elements through the Parameters Script section. For example, to change the font color of task labels:
CSS class names and DOM structure may vary between Gantt versions. Verify the available CSS classes in your specific version. See CSS Classes and DOM Structure for a reference.

Configuration Example

To set up custom progress colors and disable dynamic coloring for a specific Gantt:
  1. In Administration > Configuration Properties, add:
  2. For a specific Gantt page that needs static coloring, add to the Gantt Config Script:
  3. In the Item Script, define the color logic:
Last modified on July 10, 2026