This site is being remade and I won't be updating this for a while. Expect a lot of broken links, design and functionality. If all goes well, things should be stable by the end of 2022. Thank you for understanding.

HomePostsSnippets

Ukraine Flag (109 Bytes)

Published

There’s a challenge to draw the Ukraine flag with as few bytes as possible. I did it in 109 bytes using HTML and CSS, albeit invalid HTML.

Here’s the code:

<!DOCTYPE html><html><style>html{aspect-ratio:3/2;background: linear-gradient(#06c 50%, #fc0 50%) no-repeat;}

See the result.

I set the document to a 3/2 aspect ratio (the proportions of the Ukrainian flag) and I picked the web safe version of their colors blue #06c and gold #fc0. Other solutions are much smaller but my favorite one has to be the top answer which just zooms into an emoji with SVG.