When you want to color objects using different colors for each edge, or intersection, convert the artwork into a Live Paint Group.
For a video on using Live Paint, see www.adobe.com/go/vid0042.
Create a Live Paint groupChoose Object > Live Paint > Make.
Select the Live Paint Bucket tool
and
click the selected object.
Convert objects to Live Paint groups
Do any of the following for objects
that do not directly convert to Live Paint groups:For type objects, choose Type > Create Outlines. Then make the resulting paths into a Live Paint group.
For bitmap images, choose Object > Live Trace > Make And Convert To Live Paint.
For other objects, choose Object > Expand. Then make the resulting paths into a Live Paint group.