The blue colours of the speculum of the mallard (Anas platyrhynchos), both male and female, and the green head feathers of the male arise from light interacting with stacks of melanosomes residing in the feather barbules. Here, we show that the iridescent colours can be quantitatively explained with an optical multilayer model by using a position-dependent effective refractive index, which results from the varying ratio of melanin and keratin. Reflectance spectra obtained by multilayer modelling and three-dimensional finite-difference time-domain calculations were virtually identical. The spectral properties of the barbules' photonic structures are sensitive to variations in the multilayer period and the cortex thickness, but they are surpr...