Carvalho e Sampayo was born in the
Casa do Poço, a manor house in the city of
Lamego,
Portugal, to Diogo Lopes de Carvalho and Catarina Teresa de Vasconcelos, of a prominent gentry family. He graduated from the
University of Coimbra where he studied
Law, later, in 1783, serving as a judge in
Viana do Castelo. He resigned from his post after a conflict with the administrative authorities of the nearby town of
Vila do Conde.
Johann Wolfgang von Goethe was familiar with Carvalho e Sampayo's work: his seminal treatise
Theory of Colours (published 1810) includes a general assessment of Sampayo's 1791 book
Memória sobre a Formação Natural das Cores ("An Essay on the Natural Formation of Colours"). Starting in 1789, he moved to
Madrid where he headed the Portuguese diplomatic representation there, first as ''
chargé d'affaires'', then as a
minister plenipotentiary, and finally as
ambassador extraordinary, returning definitely to Portugal in 1801. In Madrid, Carvalho e Sampayo made acquaintance with
Wilhelm von Humboldt. ==References==