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.
Choose Object > Live Paint > Make.
Select the Live Paint Bucket tool and
click the selected object.
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.