Static vs. Dynamic Coloring
The Gantt supports two coloring modes that determine how task bar colors are applied: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.
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:
Unplanned Item Colors
Today Marker Color
Resource Marker Colors
The resource view uses color-coded markers to indicate resource allocation levels. TheresourceMarkersColorConfig object defines the color scheme:
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: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:-
In Administration > Configuration Properties, add:
-
For a specific Gantt page that needs static coloring, add to the Gantt Config Script:
-
In the Item Script, define the color logic:
Related Pages
- General Administration Properties — core behavior and scheduling properties
- Item Script API —
task.colorandtask.taskColorscripting reference - Gantt Config Script API —
gantt.config.show_progress_colorsand color overrides - Item Color Legend — visual reference for default color meanings
- Resource View Parameters — resource marker configuration
- CSS Classes and DOM Structure — Gantt CSS class reference