return color;
                    } else {
                    return mutedColor;
                    }

                    })
                    .nodeCanvasObject((node, ctx) => {
                    const numberOfNeighbours = (node.neighbors && node.neighbors.length) || 2;
                    const nodeR = Math.min(7, Math.max(numberOfNeighbours / 2, 2));

                    ctx.beginPath();
                    ctx.arc(node.x, node.y, nodeR, 0, 2 * Math.PI, false);
                    if (hoverNode == 