Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to create a dashed line with alternating colors and gaps in between

Community Beginner ,
Oct 08, 2021 Oct 08, 2021

I'm trying to create a dashed line triangle with alternating colored dashes and white spaces between. How do I do that? 

 

I've tried expanding the appearance and then seleting one dash to recolor it, but then it recolors the whole line. I've also tried ungrouping that line and it still recolors the whole line. I want the segments separate so that I can color them without it changing the whole line. 

3.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 08, 2021 Oct 08, 2021

Make a pattern brush

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Oct 08, 2021 Oct 08, 2021

line.jpg

Use the appearance panel and add a second or more paths, you can change the stacking just by dragging, play with the gap size to change the overlaps...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 08, 2021 Oct 08, 2021

Nice!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 08, 2021 Oct 08, 2021
LATEST

tromboniator_0-1633728036227.png

Create a path with three strokes: top stroke whitewith desired dash length and same gap length: middle stroke with first color, dash length and gap 2× top stroke values; bottom stroke second color, no dash. Save as Graphic Style.

 

Be sure dashes have this setting:

tromboniator_1-1633728571426.png

Peter

 

Edit: You might want to increase the stroke weight of the white gaps a bit (1 pt?) so that there's no hint of the underlying color at the edge.

 

In addition, if you want the white gaps to be invisible, in the Appearance panel set the opacity to 0%, then in the Opacity settings for the entire path click on the checkbox for Knockout Group, either once or twice until the ✓ appears. If it's a dash - , click again. This will make not only the white dashes disappear, but also the underlying second color.

tromboniator_1-1633729773764.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines