Trapping

Add a stroke to your object, then convert the stroke into a path. Object>Path>Outline Stroke. Fill the outlined stroke with a mix of the two colors needing trapping. Use the pathfinder to subtract from the shape of your stroke.