However it occurs and whatever you want to call it I am always disappointed when it happens in my photo.
Let's take a look at an example and how you can get rid of it if it happens to you.
The next photo I'm zoomed in and you can easily see the purple fringing.
There is a tool in Photoshop just for this particular problem. You'll find in under Filter and going into Camera Raw.
After entering Camera Raw click on the Lens Correction icon.
Make sure you have the Color tab selected and start adjusting the Defringe for Purple. Here I slide the amount back to 13. Keep making adjustments while zoomed into the photo. When the purple edges are gone, just click OK.
And, just like magic, all purple edges are gone!