The green and yellow in the Brazilian flag are references to the houses of Bragança and Lorraine(of Francis I&II of the House of Habsburg-Lorraine) respectively. It seems that the diamond shape in the Brazilian flag of the Empire of Brazil which, like the background green and yellow colors still remain in the present flag the country, is a reference to Napoleon.
In the book "Brasil: Uma Biografia" (Brazil, a biography) of Lilia Schwarcz and Heloisa M. Starling, they say that the diamond shape in the flag was a 'stubborn tribute' to Napoleon made by D. Pedro I of Brazil. The flag was made by Jean-Baptiste Debret, a French artist that worked for Napoleon and went to Brazil after the fall of Napoleon.
Even though the book says the reference was made by the Emperor, by citing the background of the creator of the flag I want to show that this reference isn't far-fetched at all. The tribute to Napoleon in the flag of the empire was made (probably) because of the relocation of the Portugese royal family to Brazil, which as a fact was caused because Napoleon invaded Portugal and hence Napoleon is the reason why D. Pedro I of Brazil was in Brazil in the first place, having to declare independence. I can't see any other reason for a tribute.
As a curiosity: Regarding the independence, Portugal wanted to undermine the political power Brazil got after it was elevated to part of the United Kingdom of Portugal, Brazil and Algarves (rather than a colony of Portugal) and Brazilians didn't accept it so they pressed D. Pedro I to declare independence, if I'm not wrong to avoid political instability. Actually if you think about it it was only because of the monarchy that Brazil stayed together and didn't split into tiny republics, like it was the case with our not-so-tiny neighbours.
A question remains: In what way is a diamond shape a reference to Napoleon?