Candle is made-up of wax, which consists of saturated hydrocarbons containing 18 to 20 carbon atoms.
→ When a candle is lighted (ignited), the wax melts which rises up the wick and gets covered by vapour. As a result, there is no proper mixing of O2 of air and wax vapours.
→ Therefore, here incomplete combustion of wax takes place, and complete combustion of wax does not take place.
→ Furthermore, incomplete combustion of wax produces unburnt carbon particles, which rise up in the flame, get heated and imparts yellow colour to the flame.