Not that I ever really thought about it, but you might think that a working actor who needed a temporary color change might use something temporary, like Manic Panic, to make their hair purple. But Mark Hamill went the extra mile, and then went the extra mile three times to get his hair back to normal. And he isn't too self-conscious to share it with us.
The purple hair was for his portrayal of the Trickster in a December episode of the TV series The Flash. You see that some time had passed since his Trickster role when this photograph was taken, because he's busy growing out his Luke Skywalker beard. Maybe there was some Star Wars stuff he had to get ready for quickly.