Skip to main content
Participant
November 7, 2024
Question

Split color of a grouped line segments

  • November 7, 2024
  • 2 replies
  • 500 views

I have created a relatively simple tree based on a triangle and multiple line segment objects. I want it to be split into two colors (green and white). Inverted from the background. The fill of the triangle is transparent.  I have not found a way to make strokes transparent.  Is there an easy way to accomplish.  Attached image hopefully clarifies intent. 

This topic has been closed for replies.

2 replies

Jacob Bugge
Community Expert
Community Expert
November 7, 2024

Steve,

 

As a uneditable/irreversible way (you can keep backups of the steps), you can, still presuming that both the small green rectangle and the small wite rectangle are placed on top of a larger rectangle of the opposite, otherwise change/create them to be like that:

 

1) Group the tree if not already, then create a copy of it in the desired position across both small rectangles and use Object>Path>Outline Stroke to switch from stroke to fill for both the triangle and the line segments, then use Unite/Add to shape area in the Pathfinder palette to turn it into one filled object with the same appearance, then create one copy more so you have two on top of each other;

2) Select one of the copies and one of the small rectangles and use minus front/Subtract from shape area in the Pathfinder palette;

3) Repeat for the other copy and the other small rectangle.

 

This ought to give you the appearance of a tree with its white upper part on top of the small upper green rectangle and its green lower part on top of the small lower white rectangle, obtained by removing the unwanted parts of the two small rectangles.

 

Jacob Bugge
Community Expert
Community Expert
November 7, 2024

Steve,

 

Presuming that both the small green rectangle and the small wite rectangle are placed on top of a larger rectangle of the opposite, otherwise change/create them to be like that, you can:

 

1) Group the tree if not already, then create a copy of it in the desired position across both small rectangles and turn the (stroke) colour black, then create one copy more so you have two on top of each other;

2) Select one of the copies and one of the small rectangles and in the Transparency palette (flyout) click Make (Opacity) Mask, then lock the set in the expanded Layer in the Layers palette;

3) Repeat for the other copy and the other small rectangle.

 

This ought to give you the appearance of a tree with its white upper part on top of the small upper green rectangle and its green lower part on top of the small lower white rectangle, obtained by hiding the unwanted parts of the two small rectangles.

 

This way is fully editable/reversible.

 

steve_maAuthor
Participant
November 7, 2024
Jacob,
Thanks. Will give this a try. Note, in the example, the small rectangle represents the tree and will not be included in final.

Steve
Jacob Bugge
Community Expert
Community Expert
November 7, 2024

You are welcome, Steve.

 

I hope you will share your findings.

 

As I (mis)understood the attached image, the tree consists of stroked paths which, and with the ways suggested they will effectively disappear by their being used to invert the corresponding parts of the background parts.