Flow color changing to default when adding an element in the middle


when I have two Elements and a custom color flow between and I add between them another Element the color of the second half of the flow changes to black. Do you know why this happens and how can I fix it?


Should look like this when adding a new Element in between:


my customReplaceProvider looks like this:

export default class CustomReplaceProvider {
  constructor(modeling, popupMenu) {
    this.modeling = modeling;
    popupMenu.registerProvider('bpmn-replace', this);

  getPopupMenuEntries(element) {
    const myModeling = this.modeling;

    if (customElementTypes.includes(element.type)) {
      // return empty "change type" menu for custom elements
      return function() { return []; };

    if (is(element, 'bpmn:SequenceFlow')) {
      return function() {
        // only returns custom entries without default ones
        return getEntries(element, myModeling);

Indeed it could make sense to reuse the color properties for new sequence flow created when dropping a shape on an existing one. Feel free to create an issue for this at GitHub - bpmn-io/bpmn-js: A BPMN 2.0 rendering toolkit and web modeler.. We are happy to accept community PRs too.

Not sure how your custom CustomReplaceProvider is related to this.

could someone help me with the github Issue?


could someone help me with the github Issue?

  1. Check the CSS styles:
    Review the CSS styles applied to the elements in your layout. Look for any color-related properties that might be affecting the appearance of the elements in best paraphraser tool. Ensure that you haven’t set any default color values that might be overriding the desired color.

  2. Verify the HTML structure:
    Examine the HTML structure of your layout. Make sure the elements are correctly nested and placed in the intended order. Adding an element in the middle shouldn’t affect the colors of other elements unless there are specific CSS rules targeting the new element or its siblings.

  3. Inspect the browser developer tools:
    Use your browser’s developer tools to inspect the elements and their styles. Inspecting the affected elements will allow you to see the computed styles and any applied CSS rules. Look for any unexpected changes or conflicts in the styles.

  4. Debug the JavaScript code (if applicable):
    If your layout is dynamically generated or modified using JavaScript, inspect the code responsible for adding the new element. Check if there are any color-related manipulations happening within the JavaScript code that could be causing the issue.

  5. Test in different browsers:
    Cross-browser compatibility can sometimes cause rendering inconsistencies. Test your layout in different browsers to see if the issue persists across all of them. If the problem is specific to a particular browser, investigate any known issues or workarounds for that browser.

  6. Consider external libraries or frameworks:
    If you’re using any external CSS libraries or frameworks, ensure that they are up to date. Older versions of libraries may have bugs or compatibility issues that could cause unexpected behavior.

  7. Consult the developer community:
    If you’re still unable to identify the cause of the issue, consider seeking help from developer forums, communities, or platforms like Stack Overflow. Provide a detailed description of the problem, along with relevant code snippets, to get more specific assistance.