The Vatican Flag consists of two vertical bands of yellow and white with the crossed keys of Saint Peter and the papal miter (crown) centered in the white band.
In heraldry yellow and white usually represent the two metals, gold and silver, which are not usually placed side by side. Special exception is made in the case of the Vatican Flag because the colors also represent the gold and silver keys of Saint Peter.
The flag of the Vatican is yellow and white. However it has been so only since 1808, at which date, Napoleon amalgamated the pontiff's army into his own and so the Pope, Pius VII, thought that new colors were necessary. He chose yellow and white. These colors were used for various flags of the Pontifical State from their approval in 1825 until the State was incorporated into Italy in 1870. When the state was revived as Vatican City in 1929 the yellow and white flag was reborn. The modern flag was first officially hoisted on June 8, 1929. (Keep in mind that the conventions of flag use differ significantly from armorial conventions regarding the shield proper.)
It is true that the flag is now often shown with the keys and tiara over the division between yellow and gold. As a result, they are hard to distinguish, and have been rightly criticized by Bruno Heim. This flag does not, per se, constitute a violation of the "tincture rule" in heraldry. Flags are not subject to the same rules, and even Old Regime France used a semis of fleur-de-lys gold on a field of argent as the flag for its Navy.
Prior to the modern 19th century flag, there existed something called the papal banner, which has a very long and confused history. According to Galbreath, Leo III (pope from 795 to 816) gave Charlemagne a banner which is represented in a contemporary mosaic of the Lateran triclinium: "it is a green flag of the gonfalon type with three tails, with numerous gold dots and with 6 disks coloured red, black and gold, which doubtless are meant to represent embroidery." This banner was the vexillum of the Roman militia, not really the papal banner, and in any event disappears from history until the mid-11th c., when popes take the habit of giving specially blessed flags for specific military campaigns; one of which was that of William the conqueror. Parallel with this flag of the gonfalon type we find the persistence of the classical signum, a staff tipped by a cross with a short oblong of red cloth fastened to a transverse bar below. Of the various banners given out in that period (1044, 1059, three around 1065, 1087, 1098, 1106, 1114) nothing is known except from the tapestry of Bayeux. In the tapestry, William the Conqueror (to whom we know from elsewhere that a papal banner was given) is shown with a banner of Argent, a cross or between four objects (cots? crosslets?) sable.
The cross is mentioned on flags with the second crusade only (1147-49). A contemporary depiction of the emperor Frederic I as crusader (1190) shows him with a white shiled bearing a gold cross. In 1203 Innocent III sends a flag to the tsar of the Bulgars with a cover-letter; the flag bore a cross and the keys of St. Peter. This flag reappears in 1316 when the town of Viterbo was allowed to add the vexillum of the Church to its arms: it is depicted as a red oblong flag with two tails, with a white cross cantonned by four upright white keys. By the 16th c., the simpler and more familiar version of the arms of the Church (keys gold and argent on a field gules) had won out.