I always consider several things: time spent with me, how long I had to wait to get what I wanted, if I was happy with what I got, if the person was friendly (this is always hard to judge, as I'm a very quiet person, so friendly doesn't always mean bubbly and talking, I like a peaceful, mutual quiet moment) and the cost.
In this example, if the hairdresser takes 3 hours to do a simple one color dye and cut (which has happened to me) so I gave absolutely no tip. There's no reason haircuts and colors should take longer than an hour.
In another example, a woman spend a simple half hour doing a trim up and I got my eyebrows done. She was able to get in another customer within that hour, and mine was rather inexpensive, about $30, but I still tipped $10. She was quick, she did it right, I was happy with the result.
Depending on if they were earning minimum wage or less, I might tip more than 15%, if they have done a great job.
I'll still tip if I can tell the person doing my services has had a bad day, made a small mistake, etc. Once I had super slow service at a restaurant, because the waitress had a super big party to tend to and they were always making demands of her. I ordered as simply as I could and left a big tip just because.
I think tipping is always a personal thing, and in the moment, you know how much you should tip.