Quantification and prevention of hair damage