Hey I recently started using Illustrator so still a newbie. I am trying to add 4 colors within the sunglasses as shown in Img1.

At the moment I have created 4 different sized circles and gave them a stroke of 1 and separate colors. I then created a group of these 4 circles and placed them behind the sunglasses.

What I have not been able to do is get rid of the remaining part of the circles which are not behind the right side of the sunglasses. Hence my requirements are;

  1. I only want the part of the colored circles in the right part of the sunglasses as highlighted in Img2.
  2. The circular part which is not behind the sunglasses can be hidden or deleted which ever method is easier but also smaller in size.

Img1 Img2 Img3 Img4 Img3 and Img4 are for reference.

3 Answers 3


Use a clipping mask. (rather than pathfinder, as pathfinder is very "destructive"... I used to always use pathfinder for just about everything, but anything I did was permanent, whereas Clipping masks allow me to go back and change things.)

Clone your rainbow (so that you have 2 of them)

Select one star and one rainbow then Right ClickMake Clipping Mask

Then select the other star and other rainbow and do the same thing.

  • I am actually using a pre-built star (sunglasses). Hence they are in one piece. Also when I select the sunglasses and one rainbow it just changes the color of the frame of the sunglasses to the rainbow color. What i want is to fill the rainbow color in the area of the sunglasses where the glass is suppose to be as it is in Img1
    – shahz
    Commented Feb 11, 2018 at 2:14

Use a clipping mask, but . . . it would seem you have a compound path, so there are some hoops to jump through first.

  1. Copy the object and paste it somewhere else on your artboard

  2. Click Object > Compound Path > Release

  3. Delete the inside path of the stars.

  4. Move the new object over your rainbow (which should be a group).

  5. Select both rainbow and new object, and click Object > Clipping Mask > Make

  6. Click and drag it to position it over your star-shaped frames.

  7. Click Object > Arrange > Send to Back

enter image description here

  • your answer is the best one so far but there is one small problem with it. If you look at the first image (img1) it has the same color pattern in both eyes of the sunglasses while in yours it has a mirrored effect.
    – shahz
    Commented Feb 11, 2018 at 15:47
  • @shahz - I only made that rainbow as a quick example to show you how to do it. You can use two rainbow shapes if you want, then group them, then make your clipping mask.
    – Billy Kerr
    Commented Feb 11, 2018 at 16:28

If all the objects are vector, just select them all, go to pathfinder, click divide, then ungroup the objects, click on the areas you want to delete, and delete them

  • nothing happened. I selected one of the rainbow and the sunglasses then pathfinder -> divide and nothing happened. Since the entire image is in vector then I think the objects of the image are in vector as well (correct me if I am wrong)
    – shahz
    Commented Feb 11, 2018 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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