I recognize this issue. I also have an HTC One M7 with purple spots on pictures taken at evening or night. It’s a known issue with the UltraPixel-sensor getting to much power. At my phone the purple spots always appear when there is a low light environment. The temperature doesn’t affect the availability of the purple spots on my phone. I decided not to let this repair, because I didn’t want to miss my phone for a few weeks and my phone is not mainly intended to photograph with. I do have a seperate Canon photocamera for taking photo’s.
More irritating is the fact HTC decided to not update the HTC One M7 stock firmware anymore. Now I got the very frustrating Android 5.0 with memory leak bug. My phone is mostly terrible slow and does restart from time to time.