Sophia provides a good point with the hardware vs. software issue. If it is a software issue, make sure your phone is completely updated because there have been reports of people updating their HTC One and it removed the "Purple Haze".
If it comes down to a hardware problem, this phone is not worth the time to get to the camera. On tear down, unless experienced, you are more likely to break something than to fix your problem. Try everything stated by Sophia and then check for updates. If nothing works, your not alone. This has been one of the worst camera problems ever in Androids.