Hello, how do I change the element style?

I need to change the color of each element to this.
%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20181102105232

And change the lines that have been executed into this.
QQ%E6%88%AA%E5%9B%BE20181102165858

How do I do that?
Thank you

The modeling API allows you to change an elements color:

modeling.setColor(myElement, {
  fill: 'blue',
  stroke: 'red'
});

I can’t get modeling.
image

The plug-in I use is “bpmn-js/lib/NavigatedViewer.js”

My code

this.viewer = new Modeler({
    container: this.$refs.diagramCanvas
});
      
this.modeling= this.viewer.get('modeling');

The navigated viewer doesn’t have modeling since it doesn’t allow modeling. Use Modeler instead.