Pigment analysis