[Question]
  [
**Task:** Output the Swiss flag. 
Happy Swiss National Day / Schweizer Bundesfeiertag / F√™te nationale suisse / Festa nazionale svizzera / Fiasta naziunala svizra!
**Details:**
The flag consists of a white (`#FFFFFF`) cross on a red (`#FF0000`) background. The cross consists of a 6x6 square with arms of size 6x7 glued to each side. The cross is in the center of the 32x32 square background having a distance of 6 units to each side. ([Source](https://www.admin.ch/opc/en/classified-compilation/20091656/index.html))
The output size can be chosen by the participant, but the image must exactly match these proportions, this means its size must be a multiple of 32.
![](https://i.stack.imgur.com/6FhuZ.png)
A minimal version would look like so: 
![](https://i.stack.imgur.com/D267d.png)
  
[Answer]
## SVG (HTML5), ~~94~~ ~~83~~ ~~82~~ 64 bytes
```
<svg><path d=M0,0V32H32V0M6,13h7V6h6v7h7v6H19v6H13V19H6 fill=red
```
Saved 2 bytes thanks to @ThePirateBay. Saved 1 byte thanks to @ATaco. Saved 18 bytes thanks to @CraigAyre pointing out that a 32√ó32 image was acceptable. As pointed out by @Shaggy, this assumes your default background is white; add 22 bytes for a flag that works on any background:
```
<svg><path d=M0,0V32H32V0 fill=red /><path d=M6,13h7V6h6v7h7v6H19v6H13V19H6 fill=#FFF
```
[Answer]
# x86-16 Machine Code for DOS, 43 bytes
```
               ; Draw 32x32 red square
B8 0C 28          mov  ax, 0x0C28   ; AL == color red, AH == set pixel function
B9 00 1F          mov  cx, 31
               DrawBox:
BA 00 1F          mov  dx, 31
               DrawRow:
CD 10             int  0x10
4A                dec  dx
75 FB             jnz  DrawRow
E2 F6             loop DrawBox
               ; Draw the interior white cross
B0 0F             mov  al, 0x0F    ; high byte already set
B1 06             mov  cl, 6       ; high byte already 0
               DrawCross:
B2 0D             mov  dl, 13      ; high byte already 0
               DrawCrossInner:
CD 10             int  0x10        ; plot CX, DX
87 D1             xchg dx, cx
CD 10             int  0x10        ; plot DX, CX
87 D1             xchg dx, cx
42                inc  dx
80 FA 12          cmp  dl, 13+6
75 F2             jne  DrawCrossInner
41                inc  cx
80 F9 19          cmp  cl, 6+(32-6-6)
75 EA             jne  DrawCross
C3                ret
```
The above code is designed to be assembled as a COM file and then run under DOS. It invokes the ROM BIOS video services to plot the individual pixels of the flag, forming a 32√ó32 representation of the Swiss flag in the upper-left corner of the screen.
The code assumes that the video mode is already set to mode 0x13, which also means that it requires a VGA display. Other video modes could be used, but requiring VGA gives you two things: (1) square pixels, and (2) a default palette that includes a true 100% red (`0xFF0000`) (meaning you don't have to waste bytes changing the palette colors). Before running this program, you will therefore need to switch your display to mode 0x13; the following code is all you need to do that:
```
mov  ax, 0x13
int  0x10
```
The code makes no other assumptions, and should run on any x86-compatible hardware under a DOS-compatible operating system.
However, the program terminates immediately after drawing the flag, so the DOS prompt will normally be re-printed at the top-left corner of the screen, covering up the top few lines of the flag. Therefore, if you want to marvel at the true output, you need to hang/pause the system before it `RET`urns. Here's a screenshot of what that looks like, running in a FreeDOS virtual machine:
[![](https://i.stack.imgur.com/NagTX.png)](https://i.stack.imgur.com/NagTX.png)
It might be possible to golf this down further by writing pixel data directly to the video buffer, especially since I'm already assuming mode 0x13. I haven't tried that yet. `INT 0x10` is already a pretty short instruction, *but* if I can use the one-byte string instructions to write pixel data directly to memory, then that could result in a significant code savings.
[Answer]
# [MATL](https://github.com/lmendo/MATL), 29 bytes
```
2Y66t&Y"OJQht3$)6thYaQK7hBoYG
```
Try it at [**MATL Online!**](https://matl.io/?code=2Y66t%26Y%22OJQht3%24%296thYaQK7hBoYG&inputs=&version=20.2.2)
### Explanation
```
2Y6     % Push predefined literal: 3√ó3 matrix [0 1 0; 1 1 1; 0 1 0]
6t&Y"   % Repeat each entry 6 times in the two dimensions. Gives an 18√ó18 matrix
OJQh    % Push [0 1j+1]. Used as an index, this means [0 1 ... end+1]. Indexing
        % is 1-based and modular, so 0 is the same as end
t3$)    % Apply that index in the two dimensions. This extends by 1 entry in 
        % each dimension, so that the arms have length 7. Gives a 20√ó20 matrix
6thYa   % Pad with 6 zeros in the two dimensions. Gives a 32√ó32 matrix
Q       % Add 1. The matrix now contains values 1 (will become red) and 2 (white)
K7hBo   % Convert array [4 7] to binary. Gives [1 0 0; 1 1 1], to be used as
        % colormap. First row is red, second is white
YG      % Show image using colormap
```
[Answer]
# Java 8, 246 + 42 = 288 bytes
*Thanks to @Aaron for -64 bytes.*  
*-4 bytes by outputting to file `a` without extension.*
```
import java.awt.*;import java.awt.image.*;
x->{BufferedImage i=new BufferedImage(32,32,1);Graphics g=i.getGraphics();g.setColor(Color.RED);g.fillRect(0,0,32,32);g.setColor(Color.WHITE);g.fillRect(13,6,6,20);g.fillRect(6,13,20,6);javax.imageio.ImageIO.write(i,"png",new java.io.File("a"));}
```
A lamba expression that can be assigned to a functional interface method that throws an exception. Creates an image file named `a` (an image file) in the directory running this file.
Surrounding code used to run it: [Try it online!](https://tio.run/##bZFRa8IwEMff@ykOn9IRY1XwJbiHOd36MAQ32MPYQ6zXNl1MSppaofjZu7RjA2VcyJFf7o5//inESYxNibo4fHXyWBrroPCMicaxO35L5FFk6HkQlPVeyQQSJaoKXoTUbRBI7dCmIkHYtCcjD5CS7b7AxIEJXW5NU8H6nGDppNH88jejcsL5NHQc/STy6qzU2cenCOG2DdpgAyksu/P4vn2o0xQtHuJeFcilxgauGJnPqF/TkD9ZUeYyqSBbSpah@z2TkGesQrcyylgy7Gy3fuxpKpXaefEkohEdBv1T@/4cv62vqqdzuvAxi67ogno@i@gi5L2Z5x8npWGDznjLGisdEklHpc5GtH/JYLqv2EiFZCRGYcgvHQ9SlhJdKxXy4OJjMoGV0No4EEmC/i9cjmCxqpXzHoIXgOBte4u31F@ZOssZY903)
## Ungolfed
```
x->{
    BufferedImage i=new BufferedImage(32,32,1);
    Graphics g=i.getGraphics();
    g.setColor(Color.RED);
    g.fillRect(0,0,32,32);
    g.setColor(Color.WHITE);
    g.fillRect(13,6,6,20);
    g.fillRect(6,13,20,6);
    javax.imageio.ImageIO.write(i,"png",new java.io.File("a"));
}
```
## Result
[![](https://i.stack.imgur.com/EjS3tm.png)](https://i.stack.imgur.com/EjS3t.png)
Grid provided by the IntelliJ IDEA image preview (apparently).
[Answer]
# Excel VBA, ~~86~~ ~~85~~ 79 Bytes
## Code
Anonymous VBE immediate window function that takes no input and outputs the Swiss flag onto the range `[A1:F32]` of the `ActiveSheet` object. This works by first making the cells square, then drawing the red region and finally drawing in the white cross.
```
Cells.RowHeight=48:[A1:AF32].Interior.Color=255:[G14:Z19,N7:S26].Interior.Color=-1
```
*Note that arrangements which that remove the step of coloring the "cross" of the Swiss flag after putting in the red background are actually longer than the above configuration, as they require at least 16 cell addresses,
 which coordinate to the 8 distinct regions of the flag*
-1 Byte thanks to @Greedo's for `RowHeight=48` over `ColumnWidth=2`
-6 Bytes thanks to @Greedo's for `-1` instead `rgbWhite`
## Output
[![enter image description here](https://i.stack.imgur.com/LkA5o.png)](https://i.stack.imgur.com/LkA5o.png)
[Answer]
## C++, SFML, ~~406~~ ~~399~~ 394 bytes
-2 bytes thanks to pdpi  
-10 bytes thanks to Zachar√Ω
[SFML ( Simple and Fast Multimedia Library )](https://www.sfml-dev.org/index.php) is a C++ library written to ease the developpement of video games and multimedia programs
The code :
```
#include<SFML\Graphics.hpp>
using namespace sf;int main(){for(RenderWindow t(VideoMode(128,128),"");t.isOpen();){t.clear();RectangleShape r({128.f,128.f});r.setFillColor(Color::Red);t.draw(r);r.setFillColor(Color::White);r.setPosition({24.f,52.f});r.setSize({80.f,24.f});t.draw(r);r.rotate(90);r.setPosition({76.f,24.f});t.draw(r);t.display();for(Event e;t.pollEvent(e);)if(!e.type)t.close();}}
```
The flag get displayed in a 128x128 window. Your OS have to be able to display a 128x128 window ( my Win8.1 can't display with smaller width )
**WARNING** : you may want to add these 2 lines of code : `t.setFramerateLimit(60);t.setVerticalSyncEnabled(true);`, so your CPU won't heat when you run the code. I did not put them in the original code for golfing reasons.
[Answer]
# Braindraw, 227 bytes (Non-competing) (Updated to actually work)
Ungolfed version (241 bytes)
```
r<<^++++++++[-^++++v]^[->>[>]>++++++++[-<++++>]<[<]<]>>[[-vv[v]-[^]^]>]vv<[<]>>>>>>>>>>>>>>vvvvvvg<<^^++++++[->>[>]>+++++[-<++++>]<[<]<]>>[[-vv[v]b-g-[^]^]>]<vv[<]><<<<<<<vvvvvvv<<^^++++++[-vv[v]++++++++++++++[^]^]vv[[->>[>]b[+]-g[+]-[<]<]v]
```
Lightly golfed version (227 bytes)
```
r<<^++++++++[-^++++v]^[->>[>]>++++++++[-<++++>]<[<]<]>>[[-vv[v]-[^]^]>]vv<[<]g>>>>>>>>>>>>vvvv++++++[->>[>]>+++++[-<++++>]<[<]<]>>[[-vv[v]b-g-[^]^]>]<vv[<]<<<<<<vvvvv<<++++++[-vv[v]++++++++++++++[^]^]vv[[->>[>]b[+]-g[+]-[<]<]v]
```
Braindraw is a programming language of my own design. As of 3:08 pm today, I do have a working interpreter and have checked that the program runs properly. However, the interpreter did not exist before this competition began, so I am not competing.
Braindraw is the same as Brainf\*\*\*, except that it operates on three two-dimensional arrays, rather than one one-dimensional array. These arrays are called r, g, and b, and act as the red green and blue color channels. The operator r moves the pointer to the red channel, etc etc. Up is ^, down is v.
[Answer]
# Mathematica, 83 bytes
```
R=Rectangle;Graphics[{Red,{0,0}~R~{32,32},White,{6,13}~R~{26,19},{13,6}~R~{19,26}}]
```
next one is from @ASCII-only (I thought it was a joke but it works!)
# Mathematica, 23 bytes
```
"CH"~CountryData~"Flag"
```
-10 bytes from @Jonathan Frech
[Answer]
# TI-BASIC (TI-84 Plus C(S)E only), 58 [bytes](http://tibasicdev.wikidot.com/tokens)
```
:For(A,0,31
:For(B,0,31
:Pxl-On(A,B,RED
:End
:End
:For(A,6,25
:For(B,13,18
:Pxl-Off(A,B
:Pxl-Off(B,A
:End
:End
```
[Answer]
# HTML + CSS, 15 + 117 bytes = 132 bytes
Using a flexbox wrapper with an `inset` `box-shadow`.
```
b{display:flex;box-shadow:red 0 0 0 6px inset;padding:2px;width:28px;flex-wrap:wrap}a{border:solid red 4px;margin:3px
```
```
<b><a><a><a><a>
```
---
# HTML + CSS, 18 + ~~139~~ ~~137~~ 122 bytes = 140 bytes
Previous answer using `border` and an intermediate flexbox wrapper with negative `margin`.
```
i,b,a{display:inline-flex}i{border:solid red 6px}b{margin:-4px;width:28px;flex-wrap:wrap}a{border:solid red 4px;margin:3px
```
```
<i><b><a><a><a><a>
```
[Answer]
# JavaScript + HTML, 99 + 13 = 112 bytes
*Saved 2 bytes thanks to [user2428118](https://codegolf.stackexchange.com/users/13486/user2428118)*  
*Saved 2 bytes thanks to [Matheus Avellar](https://codegolf.stackexchange.com/users/66000/matheus-avellar)*
[JSFiddle](https://jsfiddle.net/yrhhzjuf/)
```
with(c.getContext`2d`)fillStyle='red',fillRect(0,0,32,32),clearRect(6,13,20,6),clearRect(13,6,6,20)
```
```
<canvas id=c>
```
---
# Pure JavaScript, ~~194~~ 129 bytes
[JSFiddle](https://jsfiddle.net/g6ba035h/)
```
with(document.write`<canvas id=c>`,c.getContext`2d`)fillStyle='red',fillRect(0,0,32,32),clearRect(6,13,20,6),clearRect(13,6,6,20)
```
[Answer]
# [GraphicsMagick](http://www.graphicsmagick.org) (?), 96 bytes
```
gm convert -size 32x32 xc:red -fill #fff -draw "rectangle 13,6 18,25 rectangle 6,13 25,18" 1.bmp
```
Not sure how to golf with GM (should this be considered as a language?). Also not sure how to count bytes here...
With GM installed, type the given code in windows cmd, you will get an image with name `1.bmp`. You may want change double quote to single quote if you are using bash (it should work, but i had not tested this).
Thanks to Digital Trauma. use only one `-draw` save 8 bytes
[Answer]
# [GFA BASIC](https://en.wikipedia.org/wiki/GFA_BASIC) (Atari ST), ~~¬†62¬†~~ 55 bytes
A manually edited listing in .LST format. All lines end with `CR`, including the last one.
```
DEFF 2
PB 0,0,31,31
DEFF 0
PB 13,6,18,25
PB 6,13,25,18
```
Expanded and commented:
```
DEFFILL 2         ! set fill color: default system color #2 is red (&H700)
PBOX 0,0,31,31    ! draw the red square
DEFFILL 0         ! set fill color: default system color #0 is white (&H777)
PBOX 13,6,18,25   ! draw a vertical white rectangle
PBOX 6,13,25,18   ! draw a horizontal white rectangle
```
###Output
The output is 32x32.
[![GFA output](https://i.stack.imgur.com/CGyzR.png)](https://i.stack.imgur.com/CGyzR.png)
*NB: This is indeed using the 'white' color, although it's gray-looking on the emulator (and on the real thing as well, unless you turn the brightness quite high).*
[Answer]
# JavaScript (ES6) in HTML4(?), ~~178~~ 176 bytes
```
document.write('<table cellspacing=0>'+[...Array(32)].map((_,y,p)=>p.map((_,x)=>`<td bgcolor=${x>5&&x<26&&y>12&&y<19||y>5&&y<26&&x>12&&x<19?'#fff':'red'}>`).join``).join`<tr>`)
```
Yes! We do not need `<canvas>` nor `<svg>` or even `<img>`!
Thanks to Justin Mariner, save 2 bytes.
[Answer]
# [L√∂ve2D](http://love2d.org/), ~~139~~ 138 Bytes
```
l=love g=l.graphics c=g.setColor r=g.rectangle f="fill"w=255 l.draw=loadstring"c(w,0,0)r(f,0,0,32,32)c(w,w,w)r(f,13,6,6,20)r(f,6,13,20,6)"
```
Saved one byte thanks to [ThePirateBay](https://codegolf.stackexchange.com/users/72349/thepiratebay)
## Ungolfed
```
function love.draw()
    love.graphics.setColor(255,0,0)
    love.graphics.rectangle("fill",0,0,32,32)
    love.graphics.setColor(255,255,255)
    love.graphics.rectangle("fill",13,6,6,20)
    love.graphics.rectangle("fill",6,13,20,6)
end
```
[Answer]
# [Python 3](https://docs.python.org/3/), 190 bytes
Save output as `image.xpm` and open with your favorite text editor.
```
r=range;print('! XPM2\n32 32 2 1\nr c #FF0000\nw c #FFFFFF\n');d=[bytearray(b'r'*32)for _ in r(32)]
for i in r(20):
 for j in r(6):d[i+6][j+13]=d[j+13][i+6]=119
print(b'\n'.join(d).decode())
```
[Try it online!](https://tio.run/##JY7BCoMwEETvfsWWHpJUEJOAUCVXb4UeC0aKmrSNh1UWofj1VpthYXjvsjOvy2dCvW1kqMO3r2YKuHB2gsf9pixqBfspkBYJBjjXdb7H4jfCEYtMVM40/br4jqhbec@IXbQSr4ngCQGB@E5tcnCIrHJRJnCIMYpClK4JadE2Yyp1a1zsvzJSXpM4rGf7u2ycAnInMueHyXkuxLb9AA "Python 3 ‚Äì Try It Online")
Output:
```
! XPM2
32 32 2 1
r c #FF0000
w c #FFFFFF
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrwwwwwwwwwwwwwwwwwwwwrrrrrr
rrrrrrwwwwwwwwwwwwwwwwwwwwrrrrrr
rrrrrrwwwwwwwwwwwwwwwwwwwwrrrrrr
rrrrrrwwwwwwwwwwwwwwwwwwwwrrrrrr
rrrrrrwwwwwwwwwwwwwwwwwwwwrrrrrr
rrrrrrwwwwwwwwwwwwwwwwwwwwrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrwwwwwwrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
```
[Answer]
## R, 171 140 bytes.
```
x = rep(c(6,13,19,26,19,13),e=2)
l=c(0,32)
par(bg="red",mar=0*1:4)
plot(0,0,'n',l,l,xaxs="i",yaxs="i")
polygon(x,c(x,x)[4:15],c="white",b=0)
```
(somewhat) ungolfed:
```
x <- rep(c(6,13,19,26,19,13),each=2)
y <- c(x,x)[4:15] # index by 3 positions
par(bg="red",mar=c(0,0,0,0)) # prepare the plot space
plot(0,type='n', xaxs="i",yaxs="i",xlim=c(0,32),ylim=c(0,32))
polygon(x,y,col="white",border=0)
```
Thanks to @gregor for saving some bytes
[Run it!](http://www.r-fiddle.org/#/fiddle?id=UWMjeIJF&version=4)
[Answer]
# Octave, ~~105 bytes~~ 73 bytes
*Note: line feeds added for clarity, not included in byte count*
```
x(32,32,3)=0;
x(:,:,1)=1;
x(7:26,14:19,:)=1;
x(14:19,7:26,:)=1;
imshow(x*255)
```
EDIT: thanks to [flawr](https://codegolf.stackexchange.com/users/24877/flawr) for saving quite a lot of bytes!
Here is the result on octave-online.net, thanks to [sanchises](https://codegolf.stackexchange.com/users/32352/sanchises)
[![Results](https://i.stack.imgur.com/QZBXJ.png)](https://i.stack.imgur.com/QZBXJ.png)
[Answer]
# GIF, 97 Bytes
```
GIF87a    √∞  √ø  √ø√ø√ø,         @‚Äû¬©√ã√≠¬£≈ì¬¥√ö;∆í√ûXm√û!≈∏≈†cy≈íj¬®,√†Z√™<C√¥
:8n√Øt√Ø‚Äπ√©‚ÄöBJ1t√¨$1√ãKSvb=_√î¬™√µ≈†e  ;
```
Cheap and byte-heavy, but worth it. 
EDIT: Some characters aren't in the code above, [here's](https://pastebin.com/4w90RqC1) a pastebin for the GIF's hexdump. 
EDIT: compressed down to 97 bytes with online tool. 
[Answer]
# [Perl 5](https://www.perl.org/) + `-p0513`, 80 bytes
```
print"P6 32 32 1",$_=($}="A..")x192,$\=($}x13 .1x18 .$}x13)x7,($}x6,1x60,$}x6)x6
```
[Try it online!](https://dom111.github.io/code-sandbox/#eyJsYW5nIjoid2VicGVybC01LjI4LjEiLCJjb2RlIjoicHJpbnRcIlA2IDMyIDMyIDFcIiwkXz0oJH09XCJBXHUwMDAwXHUwMDAwXCIpeDE5MiwkXFw9KCR9eDEzIC4xeDE4IC4kfXgxMyl4NywoJH14NiwxeDYwLCR9eDYpeDYiLCJhcmdzIjoiLXAwNTEzIiwibWltZSI6ImltYWdlL3gtcG9ydGFibGUtYml0bWFwIn0=)
Outputs a PBM file.
---
# [Perl 5](https://www.perl.org/) + `-p0513 -M5.10.0`, 82 bytes
```
say"P6 32 32 1",map{($|--||"A..")x$_}205,@a=((18,26)x6,18),20,(54,14)x6,0,6,@a,205
```
[Try it online!](https://dom111.github.io/code-sandbox/#eyJsYW5nIjoid2VicGVybC01LjI4LjEiLCJjb2RlIjoic2F5XCJQNiAzMiAzMiAxXCIsbWFweygkfC0tfHxcIkFcdTAwMDBcdTAwMDBcIil4JF99MjA1LEBhPSgoMTgsMjYpeDYsMTgpLDIwLCg1NCwxNCl4NiwwLDYsQGEsMjA1IiwiYXJncyI6Ii1wMDUxM1xuLU01LjEwLjAiLCJtaW1lIjoiaW1hZ2UveC1wb3J0YWJsZS1iaXRtYXAifQ==)
Also outputs a PBM file. This is a slightly more interesting approach, but I can't get it to beat the above.
---
# [Perl 5](https://www.perl.org/) + `-Mutf8 -p0513 -M5.10.0`, 149 bytes
```
say"[101;97m",$\=($l=$"x32 ."
")x3,$_=(($s=$"x13).($}='‚ñà')x6 ."$s
")x3,$l=($"x=6).($a='‚ñÑ'x7).$}x6 .$a.$",("
",$",$}x20,$")x2,"
",$l=~y;‚ñÑ;‚ñÄ;r
```
[Try it online!](https://tio.run/##LYxBCsIwEEX3XsGNDANNIIakoa1ScgRPoCBdKAjRlqZCuqi4cOEJPKAHMU7ExTDzH@9Pd@hdEaNvRphvtdL1ujqDwJ1l6CxCMPlCwgx4MAL3ljH0iWrDJcPJZu/XM@OhJAf933JUhWDLZDTJeGSh4hKnpGEjEQSjj4I2sVzRwUMufsjZ21hTg@Ze9zF@2m44tRcfl5vrcFzFZacKbSgVUiupvg "Perl 5 ‚Äì Try It Online")
Output is to the terminal via ANSI escape codes and looks like this:
[![swiss swoo](https://i.stack.imgur.com/cgPok.png)](https://i.stack.imgur.com/cgPok.png)
Proportions should be to scale based on one character space being two vertical 'pixels'.
You can preview the output by copying from TIO and [pasting in here (this shows the control characters when hovered over the element)](https://codepen.io/dom111/full/RZaOVe/).
[Answer]
# HTML + JavaScript (ES6), 13 + 112 = 125 bytes
```
C=c.getContext`2d`
C[s='fillStyle']='red'
C[r='fillRect'](0,0,32,32)
C[s]='#fff'
C[r](6,13,20,6)
C[r](13,6,6,20)
```
```
<canvas id=c>
```
# HTML + JavaScript (ES6), 13 + 114 = 127 bytes
```
with(c.getContext`2d`)fillStyle='red',fillRect(0,0,32,32),fillStyle='#fff',fillRect(6,13,20,6),fillRect(13,6,6,20)
```
```
<canvas id=c>
```
[Answer]
# C# ~~265/266~~ 209 bytes
```
 using System;using c=System.Console;class P{static void Main(){for(int i=0,j;i<32;i++){for(j=0;j<32;j++){if((6<i&&i<26&&j>13&&j<19)||(6<j&&j<26&&i>13&&i<19))c.BackgroundColor=ConsoleColor.White;else c.BackgroundColor=ConsoleColor.Red;c.Write(" ");}c.WriteLine();}}}     
```
I wrote "space" characters into console while changing Background Color. But if you think it is too tall and you count single character as 8 x 16 pixels, you simply double values near "j" like this (+ 1 byte and + `c.ReadKey();` so it stops):
```
  using System;using c=System.Console;class P{static void Main(){for(int i=0,j;i<32;i++){for(j=0;j<64;j++){if((6<i&&i<26&&j>26&&j<38)||(12<j&&j<52&&i>13&&i<19))c.BackgroundColor=ConsoleColor.White;else c.BackgroundColor=ConsoleColor.Red;c.Write(" ");}c.WriteLine();} c.ReadKey(); }}     
```
56 bytes saved thanks to [TheLethalCoder](https://codegolf.stackexchange.com/users/38550/thelethalcoder) 
```
 namespace System{using static Console;class P{static void Main(){for(int i=0,j;i<32;i++,WriteLine())for(j=0;j<32;Write(""))BackgroundColor=(ConsoleColor)((6<i&i<26&j>13&j<19)|(j++<26&i>13&i<19&6<j‚Äã)?15:12);}}}
```
[Answer]
# Tikz, ~~145~~ 143 bytes
```
\documentclass[tikz]{standalone}\begin{document}\tikz{\def~{)rectangle(}\fill[red](,~33,33);\fill[white](7,14~27,20)(14,7~20,27)}\end{document}
```
Here it is "ungolfed"
```
\documentclass[tikz]{standalone}
\begin{document}
\tikz{
\def~{)rectangle(}
  \fill[red](,~33,33);
  \fill[white](7,14~27,20)(14,7~20,27)
}\end{document}
```
Here it is ungolfed a little more
```
\documentclass[tikz]{standalone}
\begin{document}
\tikz{
  \fill[red](1,1)rectangle(33,33);
  \fill[white](7,14)rectangle(27,20)(14,7)rectangle(20,27)
}\end{document}
```
This makes 3 rectangles a big red one and two smaller white ones for the plus.
Here's what it looks like. It doesn't really look any different than the others.
[![flag](https://i.stack.imgur.com/nOzq0.png)](https://i.stack.imgur.com/nOzq0.png)
[Answer]
# R, 109 bytes
```
par(mar=0*1:4,bg=2,xaxs="i",yaxs="i")
frame()
rect(a<-c(6,13)/32,rev(a),b<-c(26,19)/32,rev(b),c="white",b=NA)
```
Uses `frame` to avoid presetting a plot, but default plotting region is on interval [0,1] instead of [0,32]. Also uses the fact that `rect` is vectorized. The default size of the plotting window is 7in x 7in. It outputs the following:
[![Swiss flag in plotting window](https://i.stack.imgur.com/mHWKhm.png)](https://i.stack.imgur.com/mHWKh.png)
# R, 125 bytes
```
png()
par(mar=0*1:4,bg=2,xaxs="i",yaxs="i")
frame()
rect(a<-c(6,13)/32,rev(a),b<-c(26,19)/32,rev(b),c="white",b=NA)
dev.off()
```
Default for `png` is a square of 480x480 pixels. Output is the following png file:
[![Swiss flag](https://i.stack.imgur.com/9m43bs.png)](https://i.stack.imgur.com/9m43b.png)
[Answer]
# R, 112 bytes
```
par(bg=2,mar=0*1:4)
plot(0:32,0:32,'n',xaxs="i",yaxs="i")
rect(c(6,13),c(13,6),c(26,19),c(19,26),c="white",b=NA)
```
Though, to guarantee the aspect ratio, we need 5 more bytes for a total of 117:
```
par(bg=2,mar=0*1:4)
plot(0:32,0:32,'n',xaxs="i",yaxs="i",as=1)
rect(c(6,13),c(13,6),c(26,19),c(19,26),c="white",b=NA)
```
With lots of inspiration from [Alex Axthelm's answer](https://codegolf.stackexchange.com/a/137092/62252), and thanks to Rift for saving a few more bytes.
[Answer]
# Postscript, ~~301 286~~ 187 bytes
```
/m{moveto}def
/s{setrgbcolor}def
/r{rlineto}def
/c{closepath fill}def
1 0 0 s
0 0 m
0 320 r
320 0 r
0 -320 r
c
1 1 1 s
130 60 m
60 0 r
0 200 r
-60 0 r
c
60 130 m
0 60 r
200 0 r
0 -60 r c
```
Thanks to the anonymous editor who suggested a *99 byte reduction!*
[Answer]
# [Red](http://www.red-lang.org/), 79 Bytes
## Code:
```
view[base 32x32 red draw[fill-pen white pen off box 6x13 26x19 box 13x6 19x26]]
```
## Result:
[![window](https://i.stack.imgur.com/VWfol.png)](https://i.stack.imgur.com/VWfol.png)
## Explanation:
```
view [              ; activate view engine
base 32x32 red      ; draw a 32 by 32 red box as base
 draw [             ; draw on top of the base
  fill-pen white    ; fill color is white
  pen off           ; turn off outline, alternatively could use white
  box 6x13 26x19    ; draw a horizontal rectangle, specified as 2 corners XxY
  box 13x6 19x26    ; draw vertical rectangle
]]
```
[Answer]
## Bitmap, 160 bytes
Here's a bitmap with 1-bit colour depth, using a 24-bit colour definition. The last six bytes of the second line is the palette and following that is the pixel array. Every four bytes contains a whole row of pixels.
```
42 4D A0 00 00 00 00 00 00 00 20 00 00 00 0C 00
00 00 20 00 20 00 01 00 01 00 00 00 FF FF FF FF
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 07 E0 00 00 07 E0 00
00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00
00 07 E0 00 03 FF FF C0 03 FF FF C0 03 FF FF C0
03 FF FF C0 03 FF FF C0 03 FF FF C0 00 07 E0 00
00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00
00 07 E0 00 00 07 E0 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
```
I tried to truncate the trailing zeroes, but image viewers require there are enough pixels defined for the entire canvas.
[![Swiss.bmp](https://i.stack.imgur.com/6b1tZ.png)](https://raw.githubusercontent.com/Hand-E-Food/public/master/files/Swiss.bmp)
[Answer]
# Python 2, ~~92~~ ~~91~~ 89 bytes
```
r,w=' \0\0',' '*3
A,B=192*r,(13*r+6*w+13*r)*7
print"P6 "+"32 "*3+A+B+(6*r+20*w+6*r)*6+B+A
```
Output as binary ppm, usage: 
```
python golf_swiss.py > swiss.ppm
```
Increasing the color depth allowed me to use space for maximum value
[Answer]
# Tcl/Tk, 94
If it runs on the interactive shell, one can abbreviate `canvas` to `can` and `grid` to `gri`
```
gri [can .c -bg red -w 32 -he 32]
lmap R {{8 15 28 21} {15 8 21 28}} {.c cr r $R -f #FFF -w 0}
```
# Tcl/Tk, 98
If it runs on the interactive shell, one can abbreviate `canvas` to `can`
```
grid [can .c -bg red -w 32 -he 32]
.c cr r 8 15 28 21 -f #FFF -w 0
.c cr r 15 8 21 28 -f #FFF -w 0
```
# Tcl/Tk, 101
```
pack [canvas .c -bg red -w 32 -he 32]
.c cr r 8 15 28 21 -f #FFF -w 0
.c cr r 15 8 21 28 -f #FFF -w 0
```
[![enter image description here](https://i.stack.imgur.com/zlRvE.png)](https://i.stack.imgur.com/zlRvE.png)
]