Different Colours of Fire and Flames
Fire requires oxygen to burn. The middle of a burning flame, for example a candle, does not get much oxygen and is the hottest part of the flame. Thus it is blue in colour. The colour of the flame thus also depends on temperature change. The further the flame is from the hottest part; the more orange and yellow it turns. If enough oxygen is present a complete combustion (burning process) takes place with no unburnt material left.
The colour of the flame also depends on the chemical composition of the material that is being burnt. If you see wood burning then you might see a strong orange colour. This is because wood contains a high amount of sodium. The atoms of sodium emit light that is strongest and visibly orange for our eyes.
Some materials produce different coloured flames. Lithium and copper produce pink and blue flames each.