Bpmn.io-js color

Hi. Just try bpmn.io-js with success. Nice product, thanks! Minor question: coloring sequence flows fails? Coloring events, tasks… with canvas, overlays succeeds but, for example, this fails if id. is that of a sequence flow (shape is undefined):
var shape = elementRegistry.get('Id_c35d3cc0-def9-4743-8293-27b9c92e0c63');
Moreover, chapter about coloring (bpmn-js-examples/colors at master · bpmn-io/bpmn-js-examples · GitHub) evokes 4 methods. This blog (Colors are Here | bpmn.io) pretends that coloring may occur through viewer but viewer.setColor is not supported?
In short, how to simply color a sequence flow (arrow) through viewer? (I extracted sequence flows’ ids. from Moddle and this works fine). Thanks in advance…

Hi @Franck_Barbier, welcome!

For further assistance, please share a CodeSandbox or a code snippet that reproduces your issue in a way that we can inspect it. Otherwise it will be hard to reproduce what went wrong.


Hi Niklas.
Thanks for your prompt rely. I solved my problem by directly accessing elements in diagrams as instances of SVGElement. Then just change the CSS… You may close the issue and thanks again. Simple code:

const sequence_flow: SVGGElement = window.document.querySelector('#diagram [data-element-id=' + id + ']');
// Act on CSS next...