On this page
If you need the flag for a slide, a poster, a website or a historical illustration, the sections below give you the full RGB, HSL and CMYK values, the history behind the purple stripe, the layout rules, contrast ratios and a CSS starter.
What the 1931 Decree Actually Defined
The decree of 27 April 1931 defined the national flag as three stripes, red, yellow and purple, with a shield in the center of the second stripe. Spanish sources of the decree describe the last color as dark purple, morada oscura, rather than a specific violet. That is all the law says about color: no Pantone number, no dye recipe, no hex code.
This matters for anyone building a palette. Every code you find online, including the strip above with its copyable HEX, RGB and HSL values, is a modern interpretation of three color names. The values here favor a clear, screen-friendly reading, and I flag where other common versions differ so you can choose on purpose.
Hex, RGB, HSL and CMYK Values for Each Stripe
Here are the three official stripe colors in every format you are likely to need. I computed each value directly from the hex code.
| Stripe | HEX | RGB | HSL | CMYK |
|---|---|---|---|---|
| Red | 200, 16, 46 | 350°, 85%, 42% | 0, 92, 77, 22 | |
| Yellow | 255, 196, 0 | 46°, 100%, 50% | 0, 23, 100, 0 | |
| Purple | 123, 63, 152 | 280°, 41%, 42% | 19, 59, 0, 40 |
The CMYK numbers are a straight mathematical conversion, so treat them as a starting point. A print shop working with a real profile such as FOGRA39 or SWOP will give slightly different results, and purple is the stripe most likely to shift.

What Each Stripe Looks Like Next to Its Neighbors
The red, , is a crimson with a slight blue lean, bright but not orange. Next to blood red it looks lighter and more energetic, because blood red sits deeper and darker. Next to a pure primary red it reads cooler and more formal.
The yellow, , is a warm golden yellow with no green in it. It is brighter and cleaner than dark gold, which drifts toward brown and works better as a metallic accent than as a full stripe. The purple, , is a medium plum-violet with a hint of red. It is lighter than a royal purple and quieter than the saturated purples common in sports branding.
The flag's purple leans toward plum and mulberry, with red in the mix. Pure violet or lavender looks too blue beside the red stripe.
Why Purple? The Morado Story Behind the Tricolor
The republican flag was first used officially on 27 April 1931, thirteen days after the municipal elections led to the end of the monarchy. It was not a new design. Republican groups had used the same three stripes for years as an alternative to the red and yellow flag they associated with the Bourbon monarchy.
The purple stripe is traditionally linked to Castile and the Comuneros, the commoners’ banner. Red and yellow stand for the territories of the old Crown of Aragon. The name la tricolor also echoes the French flag, since three equal stripes have symbolized a republic since the French Revolution. If you compare the idea with the French flag colors, you can see the same logic: equal bands, no royal emblem as the main feature.
Layout, Proportions and the Coat of Arms
The flag has a few firm design rules, and following them is what separates a believable reproduction from a loose “Spanish” flag:
- Three horizontal stripes of equal width, red on top, yellow in the middle, purple at the bottom.
- Official military flags were set at 1.35 m by 2.25 m, which is a 3:5 ratio.
- The state flag carries the Republic’s arms centered on the yellow stripe, a quartered shield flanked by the Pillars of Hercules and topped with a mural crown rather than a royal one.
- A plain version without the arms served as the civil flag and merchant ensign.
- The International Brigades added a three-pointed red star to the yellow band of the military flag.
Putting a central emblem on the middle band is a layout pattern you also see on the Mexico flag, where the coat of arms sits in the center stripe. On the Republican flag, the shield must stay on the yellow, so leave a clear margin around it and never let it cross into the red or purple.
On the state flag of the Second Spanish Republic, which stripe carries the coat of arms?
The decree placed the shield in the center of the second stripe, which is the yellow one.
How It Differs From the Current Spanish Flag
The current flag of Spain uses red and yellow only. Its design is red, yellow, red, with a broad yellow band in the middle. The Republican flag changes the bottom stripe to purple and gives every stripe the same height. That single swap is the quickest way to tell them apart.
The purple stripe is also why the flag carries political meaning. After Franco’s Nationalist victory in 1939, the republican flag was banned and the red and yellow flag returned. The tricolor stayed the flag of the Republican government in exile until 1977. Today it is associated with the modern republican movement, trade unions and left-wing groups. Use it when you mean the Republic, and use the red and yellow flag when you mean Spain today.
Lighter or Darker Purple: Choosing Your Shade
Because the decree said dark purple, many vector flag files show a darker, wine-toned stripe. The most common alternatives are red , yellow and a deep purple . That purple is roughly RGB 99, 11, 87, or HSL 308°, 80%, 22%. It looks closer to mulberry than violet.
I would choose between the two on purpose rather than by habit. The lighter survives small screens, dark mode and low-quality projectors, and it stays distinct from a black background. The darker looks more authentic in archival and print settings, and it keeps strong contrast against the yellow. If you want a purple-and-yellow pairing that feels louder and more modern, the Los Angeles Lakers colors show how a different purple behaves beside gold.
Contrast Ratios You Can Rely On for Text
I calculated these WCAG contrast ratios from the hex codes, rounded to one decimal:
- Red with white text: about 5.9:1, which passes AA for normal text.
- Red with black text: about 3.6:1, which only works for large text.
- Yellow with black text: about 13.1:1, which passes AAA.
- Yellow with white text: about 1.6:1, which fails everywhere.
- Purple with white text: about 7.0:1, which passes AAA.
- Purple with black text: about 3.0:1, which fails for normal text.
- Purple on yellow: about 4.4:1, which is just short of AA for small text.
The practical rule is simple: white text on red and purple, black text on yellow. On a client project for a heritage society, I once set purple headings on the yellow band and they passed for large text but looked weak at body size, so we switched to near-black. Also note that red and purple have a ratio of only about 1.2:1 between them, so do not rely on them alone to separate two UI elements.
Try this: Build a three-stripe block with the hex codes above and place a line of 16px text on each stripe. Switch between white and near-black text, then check each pair in a contrast checker. You will see right away why the yellow stripe needs dark text.
Which text color is the safest choice for small text on the #FFC400 yellow stripe?
Black on this yellow reaches about 13.1:1, while white manages only about 1.6:1 and purple about 4.4:1.
A CSS Starter for the Tricolor
This snippet draws the flag with hard color stops and keeps the three colors as variables so you can swap in the darker purple later. Because the stripes are equal and the ratio is 3:5, the aspect-ratio value is 5 / 3.

:root {
--republic-red: #C8102E;
--republic-yellow: #FFC400;
--republic-purple: #7B3F98;
}
.tricolor {
aspect-ratio: 5 / 3;
background: linear-gradient(
to bottom,
var(--republic-red) 0 33.333%,
var(--republic-yellow) 33.333% 66.666%,
var(--republic-purple) 66.666% 100%
);
}
For a UI accent, use red for primary actions and keep purple for headers or footers. Reserve yellow for highlights, badges and the background of dark-text callouts, so the three colors never compete for attention.
Using the Colors in Print, Interiors and Fashion
On paper, the biggest surprise is the purple. I once approved a proof for a commemorative leaflet where the screen purple printed noticeably duller and bluer on uncoated stock, and we had to add a little magenta to bring the warmth back. Ask for a proof on the final paper, and expect the yellow to be the safest stripe and the purple the least predictable.
Posters, exhibition graphics and slides about the Republic and the 1930s.
Archival reproductions and book covers where a darker, aged purple suits the paper.
Interiors and web headers that use purple as the lead with a warm yellow accent.
Editorial layouts and scarves with deep red, soft cream and a restrained purple.
In interiors, treat the yellow as the main wall or fabric color, the red as a measured accent and the purple as the grounding tone in cushions, rugs or a feature panel. In fashion and merchandise, scarves, ribbons and enamel pins reproduce the three stripes well, as long as the purple does not turn blue in the dye. The palettes below give you ready-made combinations in both the lighter and darker readings.
The official colors and what they stand for
Second Spanish Republic Flag Colors: questions people ask
What are the colors of the Second Spanish Republic flag?
Red, yellow and purple, in three horizontal stripes of equal width, with the red stripe on top. The purple is usually described as dark purple, or morado oscuro in Spanish.
What is the hex code for the Second Spanish Republic flag?
This page uses red #C8102E, yellow #FFC400 and purple #7B3F98. The 1931 decree named the colors without numeric values, so other sources use slightly different codes, such as #630B57 for a darker purple.
Why does the Spanish Republican flag have a purple stripe?
The purple is traditionally linked to Castile and the Comuneros banner, and it replaced the lower red stripe of the monarchy's flag. The republican tricolor was in use by republican groups before 1931 as an alternative to the red and yellow flag.
When was the Second Spanish Republic flag used?
It was adopted on 27 April 1931 and stayed the national flag until the Republic fell in 1939. The Republican government in exile kept using it until 1977.
Is the Spanish Republican flag still used today?
Yes, but not officially. Today it is associated with the modern republican movement, trade unions and left-wing groups in Spain.
Keep exploring
- New York Knicks Colors: Hex Codes, RGB and Team Palette
- Trans Flag Colors: Hex Codes, RGB and Meaning of the Pride Flag
- New England Patriots Colors: Hex Codes, RGB and Team Palette
- Bisexual Flag Colors: Hex Codes and RGB Values
- Philadelphia Eagles Colors: Hex Codes, RGB and Team Palette
- Green Bay Packers Colors: Hex Codes, RGB and Team Palette
- Honey Blonde Color: Hex Code, RGB and Palettes
- Light Green Color: Hex Code, RGB and Palettes