In my dialog project, I use GraphEdit to visualize realations of dialog nodes. I want to implement a feature where, when a target node is selected, its incoming edges are marked in blue and its outgoing edges are marked in red. Currently, I implemented this functionality using GraphNode.set_slot_color_left() and GraphNode.set_slot_color_right(). But, the problem is, when outgoing edge connect to a node with multiply ingoing edges, these ingoint edges will also be colored with gradient. Like this.

Is it possible to disable connection color gradient in GraphEdit and only color connections which both ports have the same color? Or is there a method to customize specific connection colors?

I found the solution! In GraphEdit,there is a method called set_connection_activity(from_node, from_port, to_node, to_port, amount), which can set connection color by linear interpolation between connection base color and activity color.