It is not specifically the gender of the person that determines agreement but the grammatical gender of the noun - cheveux is invariably a masculine noun, so adjectives describing cheveux always take the masculine form.
Body “parts” generally have invariable grammatical gender.