Flag of Scotland

The flag of Scotland is a white X-shaped cross (a saltire), which represents the cross of the patron saint of Scotland, Saint Andrew on a blue sky. The flag is called Saint Andrew's Cross or the Saltire.
History
According to legend, in 832 A.D. King Oengus (II) (or King Angus) led the Picts and Scots in battle against the Angles near modern-day Athelstaneford in East Lothian. King Angus and his men were surrounded and he prayed for deliverance. During the night Saint Andrew, who was martyred on a saltire cross, appeared to Angus and assured him of victory. On the following morning a white saltire against the background of a blue sky appeared to both sides. The Picts and Scots were heartened by this, but the Angles lost confidence and were defeated. According to the legend, this saltire design has been the Scottish flag ever since.
Material evidence of the saltire's use dates from many centuries later. In 1385 the Parliament of Scotland decreed that Scottish soldiers should wear a saltire as a distinguishing mark. The earliest surviving Scottish flag consisting solely of the saltire dates from 1503: a white cross on a red background. By 1540 the legend of King Angus had been altered to include the vision of the cross against a blue sky. Thereafter, this saltire design in its present form became the national flag of Scotland.
Flying the flag
Scottish Parliament
There are five flagpoles outside the Scottish Parliament Building in Edinburgh. The flag of Scotland is flown every day, alongside the Union Flag and the flag of Europe. The fourth flagpole is used for special occasions such as Commonwealth Day and United Nations Day. The fifth pole is used for the Royal Standard of Scotland.
Edinburgh Castle
Edinburgh Castle is managed by Historic Scotland, and has a military garrison of the British Army. Like all British Army bases, it flies the Union Flag (in ratio3:5) and the Army flies it every day from the Clock Tower. The Saltire is flown every day at the Half Moon Battery.
The flying of the Union Flag at Edinburgh Castle has sometimes caused controversy. In 2001, a group of 20 Scottish National Party MSPs called for the Union Flag to be replaced by the Saltire.
Scottish Government
The Scottish Government has decreed that the flag of Scotland will fly on all its buildings every day from 8 am until sunset. An exception is made for "national days". On these days, the Saltire shall be lowered and replaced with the Union Flag. These days are the same as the flag days of the United Kingdom with the exception of 3 September (Merchant Navy Day), which is a specific flag day in Scotland and during which the Red Ensign may also be used.
Another difference with the rest of the UK's days is that on Saint Andrew's Day, the Union Flag will only be flown if the building has more than one flagpole - the Saltire will not be lowered to make way for the Union Flag if there is only one flagpole. This difference arose after Members of the Scottish Parliament complained that Scotland was the only country in the world that could not fly its national flag on its national day.
Others
The flag can be flown at any time by any individual, company, local authority, hospital or school. There is no need to get consent to fly the flag from a vertical flagpole. The flagpole itself may need planning permission.
In recent years, embassies of the United Kingdom have flown the Saltire to mark St Andrew's Day.
Most local authorities in Scotland fly the Saltire. Glasgow City Council fly the flag from the City Chambers building in George Square, while the City of Edinburgh Council fly the flag from their own city chambers.
In 2007 Angus Council led by Robert Myles decided to change the Saltire for a new Angus flag. This move led to public outcry across Scotland with more than 7,000 people signing a petition opposing the council's move, leading to a compromise whereby the Angus flag would not replace but be flown alongside the Saltire on Council buildings.
Colour and dimensions
At various times throughout history colours as light as sky blue or as dark as dark navy blue have been used (a selection apparently motivated by which colour of blue dye was available at the time). When incorporated as part of the Union Flag, the navy blue colour used was that of the Blue ensign belonging to the historic 'Blue Squadron' of the British Royal Navy. Dark blue was primarily used for reasons of expediency--it suffered less from the effects of fading resulting from prolonged exposure to the elements (namely sunlight and salt spray).
Although this navy blue colour was used specifically for depicting the Union Flag on maritime flags on the basis of durability, it soon became standard on Union Flags, both on land and at sea. This navy blue colour trend was adopted for the Saltire itself by many flag manufacturers, resulting in a variety of shades of blue being depicted on the flag of Scotland ranging from "sky blue" to "royal blue" to "navy blue". Eventually, this situation resulted in calls to standardise the colour of Scotland's national flag.
In 2003, a committee of the Scottish Parliament met to examine a petition that the Scottish Government adopt the Pantone 300 colour as a standard. (Note that this blue is of a lighter shade than the Pantone 280 of the Union Flag). Having taken advice from a number of sources including the office of the Lord Lyon King of Arms, the committee recommended that the optimum shade of blue for the Saltire should be Pantone 300 (that is, 0, 101, 189 in the RGB colour model, or #0065BD as hexadecimal web colours). Recent versions of the Saltire have therefore largely converged on this official recommendation, though dark blue has continued in use.
The flag's proportion is not fixed, but is generally taken as 1:2, 2:3, 3:5 or 4:5. The bars in the cross should be 1/5 (i.e., 20%) the width of the flag.
Outside Scotland
Inverse representations (blue saltire on a white field) of the Scottish Saltire are also used outside Scotland. In Canada, an inverse representation of the Saltire, combined with the shield from the Royal Arms of the Kingdom of Scotland, forms the modern flag of the Canadian Province of Nova Scotia, the first colonial venture of the Kingdom of Scotland into the Americas.
In Russia, during the period before and after the Soviet Union, the naval ensign of the Russian Navy has been an inverse representation of the Cross of Saint Andrew. (Saint Andrew is also a patron saint of Russia). The very same Saltire was also flown as the flag of Galicia in Spain until 1891, when Russia requested the Galician flag to be modified in order to avoid confusion between Galician ships and Russian Navy ships. The current Galician flag is actually the original blue-over-white saltire but without one of the arms of the cross.
The U.S. state of Alabama's flag is officially "a crimson cross of St. Andrew on a field of white," but the reference is used only to describe the shape without using the vexillological term saltire as that flag's origins are from either or both of the Confederate Battle Flag or the Cross of Burgundy Flag, both of which have saltires and are associated with the history of that state. Similarly, the Spanish island of Tenerife and the remote Colombian islands of San Andres and Providencia also use the saltire on their flags.
The Scottish Saltire is also used unofficially by students and graduates of Xavier University because of the university's blue and white official colors and the resemblance of the flag to the letter "X". It is also the flag for St. Andrew's Scots School, Argentina (founded in 1838) and its "spinoff" university Universidad de San Andres.
The Dutch municipality of Sint-Oedenrode, named after the Scottish princess Saint Oda, also uses the Saltire as the basis of its flag.
Incorporation into the Union Flag
The Scottish Saltire and field is one of the key components of the Union Flag. The Union Flag has been used in a variety of forms since 1606, when the flags of the Kingdom of Scotland and Kingdom of England were first merged to symbolise the Union of the Crowns. (The Union of the Crowns having occurred in 1603.) In Scotland, and in particular on Scottish vessels at sea, historical evidence suggests that a separate design of Union Flag was sometimes flown to that used in England. Following the Acts of Union of 1707, which united the Kingdom of Scotland and the Kingdom of England, the standard Union Flag became the national flag of the new United Kingdom of Great Britain.
From 1801, in order to symbolise the union of the Kingdom of Great Britain with the Kingdom of Ireland, a new design was adopted for the Union Flag of the United Kingdom of Great Britain and Ireland. The 1801 design did not change with the partition of Ireland in 1921 and creation of the Irish Free State, and is the flag of the United Kingdom of Great Britain and Northern Ireland today.
Lion Rampant
The Royal Standard of the King of Scots, also known as the Royal Flag of Scotland or the Lion Rampant, is the flag used historically by the King of Scots. It remains the personal banner of the monarch and use of this flag is restricted under the Act of the Parliament of Scotland 1672 cap. 47 and 30 & 31 Vict. cap. 17.
Despite the legal restrictions concerning the use of this flag, it is often regarded as a second, albeit unofficial, national flag for Scotland, most often seen at sporting events.