Give color to elements

Hello,

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 https://github.com/bpmn-io/bpmn-js-examples/tree/master/colors 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 https://github.com/bpmn-io/bpmn-js-in-color

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="https://unpkg.com/browse/bpmn-js-color-picker/colors/color-picker.css" />
+ <link rel="stylesheet" href="https://unpkg.com/bpmn-js-color-picker/colors/color-picker.css" />

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

1 Like