: The nature of retinal shielding pigment in the larval eyes of the midge Clunio marinus was studied by high resolution scanning X-ray fluorescence (XRF) analysis correlated with light microscopy (LM) and scanning coherent X-ray diffractive imaging (ptychography). Clunio is known as a unique model system to decipher mechanisms underlying the complex moon-related rhythms. Shielding pigment granules within the photoreceptor cells of their primitive eyes (ocelli) have been shown to change appearance in the same rhythm. We compared the relative amount of trace metals (Ca, Ni, Zn, Cu), obtained by XRF, within single melanosomes (diameter about 500 nm) and the surrounding photoreceptor cells with their optical density in the light microscope and - for the first time - the electron density derived from ptychography images. Though individual pigment granules can be identified and correlated in images of all three techniques the optical density, electron density and especially element concentrations within individual granules seem to vary independently. We discuss that the state of melanogenesis is not synchronized inside the ocellus.