The accidental discovery of mauve dye caused a revolution in fashion but also helped in important medical and scientific research in the 19th century