If your iPhone charger is starting to turn yellow or brown and charges intermittently, it’s time to replace the charger before it causes any damage to your phone -- or to you. Discoloration is often a sign of the plastic overheating and being burned from the inside out, and this excessive heat will eventually cause the charger to fail completely.
Electricity and Thermodynamics
Some heat when using a battery charger is normal. The charger works by using a transformer to convert the AC line voltage coming from a wall outlet to the DC voltage required to charge the battery. Since no process is 100 percent efficient, some of the electricity is dissipated as heat. However, excessive heat and discoloration or scorching of the charger case is a sign that the circuitry of the charger is beginning to fail. This presents a hazardous situation, not only to your phone but to you. Excessive heat and current draw from a failing charger can damage your phone and possibly result in an electric shock when unplugging the device.
Corrective and Preventative Measures
If you notice your charger beginning to discolor or char along with decreased charging performance, discontinue using it immediately. Avoid chargers manufactured by third parties that are not officially licensed by Apple, as design and quality control may not be up to Apple standards, leading to failed components.