Could you please add more CSS classes to the diagram elements?
We have a corporate style guide that defines colors for various BPMN elements (i.e. start events with green background and end events with red background). de gustibus non est disputandum
It would be super easy to write a style plugin as described here: https://github.com/camunda/camunda-modeler-plugins/tree/master/style-plugin-example
However, the diagram elements do not have CSS classes but contain only a style attribute: <circle cx="18" cy="18" r="18" style="stroke: black; stroke-width: 2px; fill: white; fill-opacity: 0.95;"></circle>
This will set the colors of your elements like in the example picture.
Note that there is one downside of this approach: the color is applied only if the id of the elements starts with a specific prefix. So make sure, that every id of every Start-Event starts with “Start” (e.g.: StartEvent117) and so on…
Coloring elements using CSS and coloring them using the API (Modeling#setColor) are two different approaches. The latter makes sure that the colors are preserved and exported.
Do you want to have the colors applied by default without being able to change them or is it only about being able to choose the exact color you need?
We want to apply the colors by default. All BPMN diagrams should automatically follow the same corporate design. Therefore, the CSS solution seems sufficient for me. When I export the diagram from Camunda Modeler the diagram elements have the correct color.