In a flame, there are four zones:(i)Non-luminous zone,(ii)Luminous zone,(iii)Dark zone and (iv)Blue zone
the yellow or orange color that you see in the fire is in the luminous zone. The color occurs due to the partial combustion of the substance. This zone is moderately hot. If you see an orange or a red color in the flame it means that the substance that the substance which is burning has a lot of impurities.  
2 3 2
Fire color is due to burnt or unburnt carbon particles
like take an example :-
.petroleum burn with giving blue flame as it has less amount of carbon particles
.wood gives orange color as it has more no. of carbon particles which left unburnt 
                 that's why when you put any metal in top of flame it get black which
                   are unburnt cparticles in form of c60
2 4 2