First of all please keep a topic focused on one single question. Open new topics for other questions.
You’re right, the setColor
method which is part of Modeling
is only available in the modeler. You can still use the low-level methods that are used by setColor
to set colors in the viewer. See https://github.com/bpmn-io/bpmn-js-token-simulation/blob/master/lib/features/preserve-element-colors/PreserveElementColors.js#L52.