Analysis of cutaneous pigmentation in a sample