
Do something till you are blue in the face
Persistence imagery
The phrase evokes the image of someone persisting to the point of exhaustion. 
Emotional frustration
It implies a sense of frustration or futility in the effort. 
Not literal
It's an idiom, so don't take it literally. It's not about actual color change. 