The flag of Hungary is a horizontal tricolor of red, white and green. In this exact form, it has been the official flag of Hungary since October 1, 1957.
Today's flag of Hungary stems from the national freedom movement before 1848 which climaxed in the 1848/49 revolution, which was not only a revolution against the monarchy and to constitute a republic, but also a national movement against the Habsburgs. Thus, the tricolor feature of the flag is based on the French flag and the ideas of the French revolution, while the colors red, white and green were taken from the historical coat of arms. The coat of arms first appeared in the form, which is but for minor details basically the same as nowadays in the mid-15th century, marshaled from arms that first appeared in the late-12th and early-13th century as arms of the Arpads, Hungary's founding dynasty.
In sum, the Hungarian flag has its origins in the national republican movements of the 18th-19th century (concerning its form, the tricolor) and in the Hungary of the Middle Ages (concerning its colors).
Folklore of the romantic period attributed the colors to virtues: red for strength, white for faithfulness and green for hope. Alternatively, red for the blood spilled for the fatherland, white for freedom and green for the land, for the pastures of Hungary.