Give color to elements


I would like to add option for painting elements in few basic colors, select element > choose color from dropdown > save.

I see bpmn-js-example but not sure how to implement dropdown with color which will appear on element select and apply selected color to element?

Any help or sandbox example?

Check out

Hi @barmac

I installed that package, imported it and add it in additionalModules but my diagram is still da same old.
Did I miss something?

Please share a CodeSandbox that reproduces your issue in a way that we can inspect it.

Here it is: bpmn-js Sandbox (forked) - CodeSandbox

  1. added dependency bpmn-js-color-picker
  2. imported
  3. stylesheet added to html
  4. additionalModules configured

but still can see color picker

Thank you. There was a typo in the extension’s readme:

- <link rel="stylesheet" href="" />
+ <link rel="stylesheet" href="" />

Here’s a CodeSandbox in which I fixed this: bpmn-js Sandbox (forked) - CodeSandbox

1 Like