Origin of the bars or pales
A great deal has been written on the Catalan bars. The traditional legend about Count Guifré el Pilóss (Wilfred the Hairy), with various versions, talks about a trace of blood let by four fingers on a golden shield. The most extended version mentions King Charles the Bald who to reward Guifre's courage in the struggle against the Moors, dipped four fingers in the blood of the countrey' s wounds and let them run on Guifre's shield. Other later versions say that it was Guifre himself who let his four fingers, dipped in his own blood, printed on the gold shield that he bore (that would save the chronological lapse between Guifr'e and Charles the Bald). A reminiscence of the fact that it was Guifr'e himself who marked the shield would be the coat-of arms and flag of Tarragona, with the four bars or pales in the form of waves, purportedly due to the jerks of agony of Guifr'e , though more probably to symbolize the sea.
The legend has a relatively recent origin, due to a tendency by Catalan writers to embellish the rich national history. The legend in the form as it was mentioned at the beginning appears initially in Bernat Boades (+1444), in the "Llibre dels fets d'armes i eclesiastics de Catalunya" reaching great popularity in the following century thanks to the diffusion made by the Valencian Pere Antoni Beuter. Still today it is believed absolutely by 99,9 % of the Catalans and in general it is known and held as true by most of the Spanish.
Nevertheless the bars or pales could be a primitive heraldic symbol that would derive from the arms used by the counts of Carcasona, from whom Guifré descended (grandson of the count Bello of Carcasona). Thus the legend would link with the royality and would symbolize that the arms of Carcasona substituted de facto in the 9th century those of the French King (something that de iure is completed in the 10th century). Naturally we are talking on a pre-heraldic era and nothing can support such supposition.
In the article of the newspaper Las Provincias the bars are attributed to the Pope. Red and yellow were the Pope's colors and the kings of the county of Barcelona (and dependencies) and Aragon were "standard bearers of the Pope". Naturally this version is merely propagandistic, an attempt to demonstrate that t he Catalan national symbol has a foreign origin, since it is known that Inocence III (1198-1216) ordered: "henceforward the banner of the Church, the called Gonfalon, will show the colors and signs of the kings of Catalonia and Aragon". That is, the orig in of the Pope's yellow and red flag (whose beginnings are not known but it is very later to the existence of the bars), which subsisted until the Napoleonic era, is in the flag of Catalonia-Aragon and not the contrary. The articulist seeks to demonstrate t hat the red and yellow colors (attested in Aragon since 1112) already appear in a Pontificial painting from the previous century: in fact is a Bizantine painting from the 11th Century shows a Pope with an umbrella or parasol in red, yellow and blue, something that has no relation either with the Pope's colors or those of the Catalan royal house.
Narcis Sentenach i Cabañas defines the Catalan bars not as pales of gules on golden field, but as golden batons on red field.
The three bars or pales (golden), began their popularity and diffusion in 1112 when Ramón Berenguer II the Great married Dolça of Provence and acquired this county and a vast inheritance in Occitany. The three golden pales or batons were then attributed to Barcelona, Besalú (that had passed to the Catalan crown the previous year 1111) and Provence. The existence of the three pales or batons is attested by the seals of Ramón Berenguer II. The study of seals and engravings in stone or metal would indicate that yellow was the main color, and red the background. Furthermore the yellow batons tend to be broader than the background .
After the incorporation of Aragon into the Catalan crown in 1137, the three pales or batons were accepted by the king (Ramón Berenguer) and by the people (the ancient arms of Aragon, Saint George's cross on silver field, were not abolished but relinquished the main place to the Catalan symbol) and they were attributed a new meaning: Barcelona (county with a category higher than the others), the smaller counties (like Cerdanya, that had passed to the Catalan crown in 1117) and Aragon (small and poor territory but whose chiefs had given themselves from ancient times the pompous title of king).
The symbol persisted in the same form, but with Peter I of Catalonia and II of Aragon all the territories in Occitany were lost except Montpellier (Battle of Muret, 1213) and a new meaning is given to the bars or batons: one for Barcelona, other for Aragon and a third for Montpellier.
On 10 August 1218 king James I instituted in his capital, Barcelona, the Order of the Mercy and granted it the royal emblem: "three gold pales on a background of gules, surmonted by the silver cross of the Chapter, granted by the Bishop Berenguer de Palou (white cross on red background)