2

I'm trying to connect two objects Filled with different colors with the Connector Tool, then have the Connector Line show the two different colors associated with the objects. Can I do that with the Stroke of the Connector Line?

Thank you!

0
1

A possible work around would be to apply a linear gradient to the stroke, sampling both objects' fill colours for each end stop of the gradient. However the gradient won't move automatically with the diagram connector. You'd need to reposition the gradient each time you moved the objects.

Example

enter image description here

11
  • 1
    That's helpful, but pretty cumbersome when I have hundreds of nodes that I need to shift occasionally. Is it possible for the Connector Line to be striped with those two colors and not a gradient?
    – Phoenix
    Mar 11 '20 at 13:14
  • Yes, it's cumbersome, that's why I added the "However" part to my answer. You could do stripes with a gradient, but you'd still be in the same boat. The gradient will not move with a live connector. As far as I know, there's no other way to get a single path live connector with two coloured strokes.
    – Billy Kerr
    Mar 11 '20 at 13:39
  • Of course if you remove the requirement for doing this with Diagram Connectors there are other ways to have two strokes, but that would likely require two paths with two different strokes. This is not possible with Diagram Connectors which are made of a single path only.
    – Billy Kerr
    Mar 11 '20 at 13:45
  • 1
    @Phoenix Apply a linear gradient to the stroke, then using the Gradient tool, double click on the gradient to add two additional stops in the middle of the gradient, set them to the same colour and opacity as the two end stops, them move them both together into the middle. See example
    – Billy Kerr
    Mar 11 '20 at 15:17
  • 1
    @Phoenix Another example with two strokes side by side. The strokes are under the two circles. Couldn't be simpler really.
    – Billy Kerr
    Mar 11 '20 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.