APEX 18.2 in compatibiity mode for 4.2 and using Theme 26 "PRODUCTIVITY_APPLICATIONS".
Setting colours of OJ Gantt Tasks using CSS classes defined by the Gantt SQL causes the same classes to be appended rather than overwritten each time the Gantt region is refreshed. (It also remembers old task classes which cause conflicts when trying to change colour).

In this example I am returning either "blue" or "grey" from the MY_COLOUR item and applying it to a Gantt Task.
Rather than the Gantt Task CSS class overwriting the old value, it is appended like so.

Here the task started off as blue, then set to grey however the blue class remained (which overrides the grey colour making it stay blue) and each refresh or resize of the gantt region (which triggers a refresh) caused the current value of MY_COLOUR to be applied to the Gantt Task again resulting in some very long strings of CSS class names which conflict with eachother.
Does anyone know of any way to prevent this from happening so that on the region refreshing, only the current value of MY_COLOUR is applied to the Task?
Thanks in advance,
BRB