Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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
1  
There is a tool in AI-CS5 that is "Live Paint". I think it is used for such situtaion as yours. - youtube.com/watch?v=0Fs5a4L7goQ –  Jawad Aug 26 '12 at 21:23
    
add comment

3 Answers 3

up vote 4 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 at 12:19
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.