Caspar David Friedrich (1774–1840), one of the most famous German 19th c. painters, created paintings throughout his artistic life using different paint palettes, including many new pigments from the turn from the 18th to the 19th century. In that regard especially blue and yellow pigments are the focus of this non-invasive chemical study using X-ray fluorescence imaging, as these are a landscape painter's major colours. Four paintings from the collection of the Alte Nationalgalerie, Staatliche Museen zu Berlin-Stiftung Preußischer Kulturbesitz, spanning over two important decades of Friedrich's artistic career, were investigated in situ to determine the chemical composition of the blue pigments used in the sky and the yellow hues used in the sunsets and moonlight. The results indicate the use of iron based yellow pigments as well as smalt based blue pigments in Friedrich's early works, while chromium-based yellow pigments and cobalt blue are used in later paintings. The finding of cadmium sulphide in a painting dated in 1817, probably as a historical retouching, is interesting and requires further research. This in situ non-invasive imaging study, although limited to one analytical technique, shows Friedrich's introduction of new synthetic pigments into his paint palette, which varies over the time. These results are important to better understand the painting technique of Caspar David Friedrich and his contemporaries.