In 2010 in Canada there was a lot of meth going around that turned blue when melted. Not quite as intense as the picture further up the thread, it was more of a clear ice blue. Apparently the color was due to some new ingredient they started adding to Reactine brand pseudoephedrine tablets. It was okay dope,, though.
In your case it looks like metal contamination, which I've seen before, but not only when melted. Did it come in contact with any metal implements at any point?
Could also be a blocker that was in the pills for the purpose of messing up your cook.
Did you distill the oil? If you did, you probably wouldn't be having this problem. You should turn it back to freebase and distill it. Fixes everything.