Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am still pretty new to illustrator, so I am still learning. I have a shape (pill shape) that is all white. I am trying to "fill" half of the shape with a yellow color (keeping the black stroke intact. Does anyone know how to go about this?

share|improve this question
There is a tool in AI-CS5 that is "Live Paint". I think it is used for such situtaion as yours. - – Jawad Aug 26 '12 at 21:23
up vote 5 down vote accepted

This one is a bit hackish but it does the trick as well. Make a gradient where you have each color on either end, then click each little colored box under the gradient preview in the palette and set its location to 50. This way you've solved the problem but it's all in one object.

enter image description here

share|improve this answer
Why do you say this is "hackish?" – RKS Aug 21 '12 at 2:52
Well I used the gradient tool to create something that, by the definition of a gradient, isn't really a gradient at all. – Brendan Aug 21 '12 at 3:53
Perhaps...but in web CSS a gradient is often used in such a way to create hard angles instead of soft fade. Wasn't saying it's wrong, it's +1 for a creative and most efficient answer, but I don't think it's hackish. – RKS Aug 21 '12 at 4:15
Clever answer! :-) – Emilie Jun 17 '14 at 12:19

Start with your rectangle:

Start with object

Draw a line and use the Align palette to center it in the rectangle:

Draw line and center

Select both the rectangle and the line and use the Pathfinder palette to split the rectangle based on that line:

Split box

Delete the half you don't want and then color the other one:

Delete half, color half

Use the Align palette again to line up your new colored box with the original one:

Stack objects

You're left with two objects, but it does the trick.

share|improve this answer
I didn't know how to split objects in half (I don't use Illustrator much) so thanks for that – jhocking Aug 21 '12 at 1:48
I just went into Illustrator to try this and noticed there is another tool that does the exact same thing as that Pathfinder step. Select the dividing line and go to Object>Path>Divide Objects Below – jhocking Aug 21 '12 at 3:20
Cool! Yeah I've been using Illustrator for years and I still pick up things along the way. It's good to share knowledge with people...thanks for sharing yours! – Brendan Aug 21 '12 at 3:55

Build it as a clipping mask and put the half fill you're after in it as a clipped object. Then you can apply a color to the mask to fill the other half with just the two shapes.

share|improve this answer
Thanks.. I have tried to do the clipping mask but it always either cuts the white side away.. I just cant get it to work the way I am used to in photoshop – Louis Stephens Aug 20 '12 at 19:14
The shape that becomes the clipping mask has all attributes removed by default (AI assumes it's only for clipping). Once the mask has been created, you can select it multiple ways and apply most all types of formatting. Any color/pattern applied to it's fill becomes the background for the clipped group. – plainclothes Aug 20 '12 at 21:20
This is not described that clearly. To do this the OP is meaning you need three objects. One in the back that is a solid color, copy that and change the fill to a different color, then copy that, scale it by 50% to cover one side of the middle object, then select the top and middle and create clipping mask. This is good stuff to know, but in this case it is probably the least efficient of all the answers. – RKS Aug 21 '12 at 2:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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