Come November 1, Programming Puzzles and Code Golf will graduate, so in the next 11 months, we'll want to save some memories from when we were ungraduated.

Write a program that produces the PPCG favicon, seen below.

enter image description here

  • The image must be at least 64x64 pixels.
  • The blue must be the color #62B0DF. The background can be white or a light gray.
  • The image need not be pixelated like it is here.
  • Alternatively, create text (with dimensions at least 64x64 non-whitespace characters) using standard bright ANSI color codes of Cyan and White.
  • Built in images and importing the PPCG logo are not allowed.

This is code golf, so standard rules apply. Shortest code in bytes wins.

  • 10
    \$\begingroup\$ Seriously though, what do you mean by print? Output the bytes of this exact image? Display the image on the screen? Something else? \$\endgroup\$
    – Dennis
    Commented Nov 25, 2015 at 15:12
  • 3
    \$\begingroup\$ Without any restrictions on how the image can be displayed or generated, or any guidelines what kinds of answers should be considered interesting, this is by far too broad for a popularity contest. \$\endgroup\$
    – Dennis
    Commented Nov 25, 2015 at 17:02
  • 6
    \$\begingroup\$ @LegionMammal978 The popularity-contest tag is not an excuse for a vague spec. The specification of a popularity contest should be held to the same standards as that of any other challenge type. The tag is intended for challenges where humans are better at judging the quality of an answers than computers (e.g. visual similarity in an image processing challenge), not for challenges where it's not even clear what a good answer would look like to a participant. "Most votes" does not constitute an objective winning criterion if there are no guidelines for how to aim for those votes. \$\endgroup\$ Commented Nov 25, 2015 at 17:24
  • 7
    \$\begingroup\$ I'd suggest to at least disallow loading the logo from any resource. \$\endgroup\$
    – nicael
    Commented Nov 25, 2015 at 17:28
  • 8
    \$\begingroup\$ @Dennis He meant print it using the nearest cloud printer \$\endgroup\$
    – Optimizer
    Commented Nov 25, 2015 at 22:38

26 Answers 26


Bash (OSX), 33 27 23 18 Bytes

You heard the man, any way we like.

open http:yon.se/q

I am aware that this is a popularity contest. But hey, when you can code golf it, why not?

It is now a code golf. \o/ This was valid at the time of posting.

There was even an exception made for me at some point! But, as @AlexA. pointed out...

"You can use whatever methods you want (except loading the image, with the exception of VoteToClose's response)" It isn't fair to allow exceptions for specific users/answers. - Alex A.

I agree with this, and, as of such, do not wish this to be picked as the answer. Doesn't mean I won't still try to golf it down more. ;)

Thanks to @ΚριτικσιΛίθος for shaving off 6 bytes with a fancy short URL!

Thanks to @ev3commander for shaving off ANOTHER 5 bytes with an even fancier, shorter URL!

Thanks to @kennytm for pointing out that I can reduce the protocol size and remove the quotes, saving me another 4 bytes!

  • 1
    \$\begingroup\$ @VoteToClose You can use this shorter URL to reduce byte count: http://goo.gl/gviJDX \$\endgroup\$
    – user41805
    Commented Nov 25, 2015 at 19:44
  • 6
    \$\begingroup\$ @manatwork Reverse psychology? It's working. \$\endgroup\$ Commented Nov 26, 2015 at 0:07
  • 1
    \$\begingroup\$ Even shorter: open http:goo.gl/gviJDX \$\endgroup\$
    – kennytm
    Commented Nov 28, 2015 at 4:46
  • 5
    \$\begingroup\$ try this url: http:yon.se/q \$\endgroup\$
    – user46167
    Commented Nov 28, 2015 at 23:32
  • 6
    \$\begingroup\$ Link is borked. \$\endgroup\$
    – Riker
    Commented Apr 7, 2016 at 23:31

BitShift, 2795 bytes


This outputs

 @   @@@  @@@   @  
 @ @@ @ @@ @ @@@@  
 @   @@ @@@@ @  @  
 @ @@@@ @@ @ @@ @  
 @ @@@@@  @@@  @@  

  This is probably the shortest code with which you can actually still recognize the logo... I created a terrible language :(

Try it here

This was submitted before the rules were changed, by the current rules this answer is invalid. I will leave it here to perhaps inspire people

  • 6
    \$\begingroup\$ Now now, don't be sad, that is some very special output from a very special language. \$\endgroup\$
    – Namaskar
    Commented Nov 25, 2015 at 19:33


Note: This answer was made before the rules were significantly changed so this answer is not competing.

This prints in into the your browser console, through some crazy and awesome string processing.

I've made a shorter version of this but I can't seem to find it anywhere.


This version just doubles up on each pixel so it looks more proportional

var a = `<long_string_here>`;
console.log.apply(console, [].concat.apply( [Array(+a.split('\n')[1].split(' ')[1] ).join(' ').split(' ').map(function(l){return'%c█'.repeat(+a.split('\n')[1].split(' ')[0]).repeat(2)}).join('\n')], a.split`
`.slice(3).map(function(l){return [].concat.apply([], l.match(/\d+ \d+ \d+/g).map(function(l){return [l.replace(/(\d+) (\d+) (\d+)/,"color:rgb($1,$2,$3)"),l.replace(/(\d+) (\d+) (\d+)/,"color:rgb($1,$2,$3)")]}))})))


var a = `<long_string_here>`;
console.log.apply(console, [].concat.apply( [Array(+a.split('\n')[1].split(' ')[1] ).join(' ').split(' ').map(function(l){return'%c█'.repeat(+a.split('\n')[1].split(' ')[0])}).join('\n')], a.split`
`.slice(3).map(function(l){return l.match(/\d+ \d+ \d+/g).map(function(l){return l.replace(/(\d+) (\d+) (\d+)/,"color:rgb($1,$2,$3)")})})))

The long_string_here is an ppm, I wrote this script a while back to print an arbitrary image to the console.

How does this work? Well JavaScript has a feature in console.log where you can provide css to style the message.

I the unicode character and color that the correct color, which is retrieved from the ppm.

To display any other image run: convert my_img.png -resize 50x50 -trim -compress none -blur 1x2 -flatten -background white ppm:-, then copy the output to <long_string_here>

Full code

Because this is quite massive, I've put the full code in pastebins so you can run them

Chrome/Firefox: pastebin

Safari: pastebin


enter image description here

Firefox Result

Safari Result

  • 4
    \$\begingroup\$ Can you downsize the screenshots a bit? Every single one of them takes up all of my vertical screen estate. (Maybe one image is sufficient, make the rest links). \$\endgroup\$
    – user42643
    Commented Nov 27, 2015 at 7:27
  • \$\begingroup\$ What's the byte count? this is code-golf now \$\endgroup\$
    – cat
    Commented Nov 27, 2015 at 15:57

Ruby with Shoes

zoom = 10

Shoes.app(width: 19 * zoom, height: 18 * zoom) {
    background white

    stroke fill '#62B0DF'
    rect 1 * zoom, 1 * zoom, 17 * zoom, 13 * zoom, 3 * zoom

    skew 0, -45
    rect 10 * zoom, 11 * zoom, 5 * zoom, 4 * zoom

    stack(left: 1 * zoom, top: 3 * zoom) {
        para('PCG').style size: (5.66 * zoom).to_i, weight: 700, stroke: white


Sample output:

PPCG logo drawn with Shoes


Javascript (ES2015), 199 bytes

(+72 bytes of CSS)

My code prints the logo into the <body> element of a page through some unicode sequences. Suggestions improving the code are welcome (especially for 0-pads task)

Demo (tested on MacOsX/Chrome 46): http://codepen.io/anon/pen/EVBmKN?editors=011

Javascript (newlines inserted for readability)

f=l=>{for(l of[49155,0,0,0,29070,19024,29206,16978,16780,0,0,32769,49155,65311,
[...l].map(b=>["▉", " "][b]).join``+"\n"}


*{letter-spacing:-.1em;font:1em/.96 arial;white-space:pre;color:#62B0DF}


PCG Logo

Ungolfed and Explained

If we consider the original 16x16 PCG icon originally posted, we could encode the information in a binary format.

E.g. the first line would be encoded as 1100 0000 0000 0011 where [0, 1] maps to [blue, white]. Every binary number can be easily stored in decimal format so 1100 0000 0000 0011 is 49155. The array


contains all the information (in decimal format) about each pixel color. Each element of the array represents a line to draw. Note that some lines are 0 (full-blue lines) or their length is less than 16 digits (a line starting with a blue pixel): then we need to right-pad these binary numbers


The map function add 15 zeroes to the left plus the binary number concatenated. Thus the result is sliced by 16 pixel to the left. Now the array is actually

0:  "1100000000000011"
1:  "0000000000000000"
2:  "0000000000000000"
3:  "0000000000000000"
4:  "0111000110001110"
5:  "0100101001010000"
6:  "0111001000010110"
7:  "0100001001010010"
8:  "0100000110001100"
9:  "0000000000000000"
10: "0000000000000000"
11: "1000000000000001"
12: "1100000000000011"
13: "1111111100011111"
14: "1111111100111111"
15: "1111111101111111"

Take a look closer at the digits above: we can almost see the PCG logo. :)
Note that if we store this information in the array, we need to use 16x18 bytes (288 bytes). This approach requires instead 135 bytes

The next step is draw each line. The construct

for(l of [...].map(...))

loop over the array values (ES6 feature) and we add to the body

document.body.innerText += [...l]

where [...l] represent the binary string as an array . E.g. the first line would be read as

["1", "1", "0", "0" ... , "0", "0", "1", "1"]

then again we use map() to transform each value:

 b=>["▉", " "][b]

if the value is 0 then it becomes a LEFT SEVEN EIGHTHS BLOCK (U+2589) otherwise it is a space EM SPACE (U+2003). In short this assignment

document.body.innerText += [...l].map(b=>["▉", " "][b]).join``+"\n"

converts each 0 or 1 either into a squared block or into a space: then the array is joined and, along with a trailing newline sequence, is appended to the body.

The CSS I've used fixes the line-height and the letter-spacing (I've tested on Chrome, so the result may slightly vary in other browsers)

  • 3
    \$\begingroup\$ control-f 0, and you CAN see the PPCG logo in the 0s and 1s :D \$\endgroup\$
    – user46167
    Commented Nov 29, 2015 at 0:04
  • \$\begingroup\$ @ev3commander When I control-f, then it starts lagging, due to the BitShift answer. \$\endgroup\$
    – sporkl
    Commented Mar 21, 2017 at 20:05

Brainfuck, 120148 bytes

This answer is now non-competitive. This was before the rules were changed, and this has absolutely no hope of winning as code-golf.

Brainfuck code to output hex value of image. Very, very, long.

Here is a pastebin link, and the first couple lines. https://paste.ee/p/LtcCy

  • \$\begingroup\$ +1 for the solid byte count, reads very well! Just a note: pasted it there, looks like 120,148 bytes. \$\endgroup\$
    – nicael
    Commented Nov 27, 2015 at 20:09
  • \$\begingroup\$ Thanks, I put in through that exact same counter. I must have mistyped or something. Fixed now. \$\endgroup\$
    – Riker
    Commented Nov 28, 2015 at 23:01

Snap, 16 blocks

enter image description here
Tell me if this is invalid.

  • \$\begingroup\$ Probably invalid... but who cares; it looks good enough. \$\endgroup\$
    – wizzwizz4
    Commented Dec 15, 2017 at 18:29

Javascript ES6, 461 bytes

I need to work on the compression more.

x.style.cssText='display:block;font:4px/2px monospace;color:#62B0DF',x.innerHTML=`  28
`.repeat(8)}6   a   a    7
6  8  8 8  8  8  6
6  8  +  7  71
6      +9 6
6  a9 6
6  6a 8  1 6
698   +  6
6  7+   1+    7
${a} 31
4+`[r='replace'](/a/g,'  1')[r](/9/g,'  7  +  ')[r](/8/g,'++')[r](/7/g,11)[r](/6/g,'1++')[r](/5/g,'31+')[r](/4/g,Array(18).join` `)[r](/3/g,21)[r](/2/g,11111111)[r](/1/g,'+++')
<pre id=x></pre>


Bubblegum, 175 bytes

One of the rare times Bubblegum is useful for !

Run in a terminal that supports ANSI escape codes.

0000000: e060 3e00 a75d 000d 97c4 b1da c813 35e1  .`>..]........5.
0000010: 9ebb 75d8 b95a ea28 a23d e9c6 5d80 7ce0  ..u..Z.(.=..].|.
0000020: 8d72 884f 2eb0 23f0 a6dc 406b 5724 9b78  .r.O..#...@kW$.x
0000030: 229d 11b7 29c8 9be6 7b76 26d4 f41a 69e0  "...)...{v&...i.
0000040: e626 1923 061a 07fc 4ca6 3cc9 f947 7760  .&.#....L.<..Gw`
0000050: 86df 1d86 37a8 6825 dd9d a3b4 a050 573c  ....7.h%.....PW<
0000060: 7efa 920a 446d 98f8 eeb9 91f7 f912 ca3b  ~...Dm.........;
0000070: 9360 ddba 3450 30ff cee0 fb32 31d1 06cd  .`..4P0....21...
0000080: 0d46 2f2d 5371 896c 6bb0 5fb8 3d6d f096  .F/-Sq.lk._.=m..
0000090: 67e9 8cb8 f92f 9eaa 7d35 0914 a742 6315  g..../..}5...Bc.
00000a0: 1a62 f54d b969 b980 c832 8a3f 8c00 00    .b.M.i...2.?...

Reverse the hexdump with xxd -r

Here's a screenshot of output:

Screenshot of program output

Note: On my Windows machine with the MinGW terminal, the Windows Python binary doesn't output ANSI codes correctly so the above was python <esolangs reference implementation>.py <infile> | cat but it should work correctly on Linux machines.


Javascript (ES6), 192 bytes

document.body.innerHTML='<svg><path fill=#62B0DF d="'+"m01Q0010L60Q7071L74Q7565L55L37L35L15Q0504z".split('').map(v=>v*20||v).join(" ")+'"/><text y=65 fill=#FFF style="font:38pt arial">\xa0PCG'

This takes a compressed version of a SVG D path. Spaces are removed, so all arguments have to be a single decimal, so any number is multiplied by 20 before being written to the actual svg.

enter image description here
Demo: https://jsfiddle.net/Luy6qj80/

  • \$\begingroup\$ @RikerW It doesn't look to be taking from a URL. \$\endgroup\$ Commented Mar 9, 2016 at 3:21
  • \$\begingroup\$ NVM, I realized what this does. Nice job. \$\endgroup\$
    – Riker
    Commented Mar 9, 2016 at 3:42

LibreLogo, 122 116 115 bytes

Using Logo to create a Logo. Does this count as recursion?


fontsize 20 fontcolor [3]fontweight "bold pc [24]fc 6402271 bk 40 rt 45 fd 40 fill home rectangle[64,52,5]text "PCG


enter image description here


fontsize 20             ; Font Size   = 20pt
fontcolor [3]           ; Font Color  = white
fontweight "bold        ; Font Weight = bold
pc [24]                 ; Pen Color   = invisible
fc 6402271              ; Fill Color  = #61B0DF
bk 40                   ; Move Back 40pt
rt 45                   ; Turn Clockwise 45 Degrees
fd 40                   ; Move Forward 40pt
fill                    ; Close and Fill the Line Shape
home                    ; Reset Initial Turtle Settings and Position
rectangle[64,52,5]      ; Draw a Rectangle with Rounded Corners
text "PCG               ; Set Text of the Actual Drawing Object as "PCG"

Previous Attempts:

116 Bytes:

fontsize 20 fontcolor [3]fontweight "bold pc [24]fc 0x61b0df bk 40 rt 45 fd 40 fill home rectangle[64,52,5]text "PCG

122 Bytes:

ht fontsize 20 fontcolor [3]fontweight "bold pc [24]fc [97,176,223]bk 40 rt 45 fd 40 fill home rectangle[64,52,5]text "PCG

JavaScript, 680 bytes

Well, I had this already finished for the original contest, which rules were changed drastically. This is definitely not the shortest code you can come up with. It was designed for the popularity contest and it creates the original favicon pixel by pixel. It has some more features, too. :)


You can call the function with up to three parameters:


m goes meta and changes the color accordingly. And if you find it to small, use b to supersize it from 16x16px to 64x64px. Finally a animates the logo, like it is engraved into a blue board. The value is the speed for each animation step.


    if (c.b) x.scale(4,4);
    x.fillStyle = c.m?'#2d2d2d':'#62b0df';



PPCG Favicon reproduction


PPCG Favicon reproduction animated

  • \$\begingroup\$ Six hundreds and eighty bytes?! You want to make your answer leaderboard-bot proof? \$\endgroup\$
    – RedClover
    Commented Sep 28, 2017 at 13:38

Python 3, 10,069 bytes

Writes the hex from the original logo to a new file.

with open('test.png', 'w+b') as image_file:
    for line in ['\x89PNG\r\n', '\x1a\n', '\x00\x00\x00\rIHDR\x00\x00\x00\x13\x00\x00\x00\x12\x08\x06\x00\x00\x00\xb9\x0c\xe5i\x00\x00\n', '\xa3iCCPICC Profile\x00\x00H\x89\x95\x97\x07T\x13\xe9\x16\xc7\xbf\x99I/\x94\x04"\x9d\xd0;R\x04\x02H\xaf\xa1\x08\xd2\xc1FH\x02\t%\x84@\x10\xb1#\xe2\n', '\xac\x05\x15\x91bAW)\n', "V@\xd6\x82\x88baQ\xec}A\x16\x01u],\xd8Py\x03<\xc2{\xef\xbc=\xef\xbc{\xce\x9d\xf9\x9d{\xee\xfc\xe7\xce7\xf3\x9d\xf3\x1f\x00(]\x1c\xb18\x15V\x00 M\x94%\t\xf3\xf3d\xc6\xc4\xc61\xf1\xbf\x03\x02\xc0\x00\x1ap\x02\xca\x1cn\xa6\xd8#44\x08\xfcm|\xbc\x07\xa0\x89\xf3m\x8b\t\xad\xbf\xef\xfb\xaf\xa1\xc8\xe3gr\x01\x80BQN\xe0er\xd3P>9\x91\\\xb1$\x0b\x00D\x80\xd6\xf5\x96f\x89'\xb8\x18e%\t: \xca{'8i\x8aONp\xc2\x14_\x99\xec\x89\x08\xf3B\xf9\t\x00\x04\n", "\x87#I\x02\x80<\x84\xd6\x99\xd9\xdc$T\x87B@\xd9J\xc4\x13\x8aPf\xa1\xec\xca\x15px(\xe7\xa0l\x9e\x96\x96>\xc1\x07P6N\xf8\x17\x9d\xa4\x7f\xd3L\x90ir8I2\x9ez\x96\xc9 x\x0b3\xc5\xa9\x9ce\xff\xe7r\xfc\xefHK\x95N\xdfC\x17M\x8a@\xe2\x1f6qF\xd7\xac&%=P\xc6\xa2\x84y!\xd3,\xe4M\xf6O\xb2@\xea\x1f9\xcd\xdcL\xaf\xb8i\xe6q\xbc\x03\xa7Y\x9a\x12\xe91\xcd\x1c\xc9\xcc\xb5\xc2,v\xc44K\xd2\xc3d\xfa\xfcL\x9fp\x99>\x9f\x1d$\x9b!u\x9e\x8c\x13\x85\xbe\xeci\xce\x15DDOs\xb60j\xde4g\xa6\x84\x07\xce\xf4x\xc9\xea\x12i\x98l\xe6D\x89\xaf\xec\x19\xd32gf\xe3rff\xc8\x12D\xf8\xcf\xcc\x16#\x9b\x81\xc7\xf7\xf6\x91\xd5E\x91\xb2~q\x96\xa7LS\x9c\x1a*\xeb\xe7\xa7\xfa\xc9\xea\x99\xd9\xe1\xb2k\xb3\xd0\x0fl\x9a\x939\x01\xa13:\xa1\xb2\xf5\x01^@\x08D\x80\x0f\xd2\x00'\x8b\x9f\x9351\xa8W\xbax\x99D\x98$\xc8bz\xa0;\x85\xcfd\x8b\xb8\x96\xe6L\x1b+k;\x00&\xf6\xdd\xd4k}\xcf\x98\xdcO\x10\xe3\xdaLm\xb91\x00\xeee\x00\xc053\xb5\xe8c\x00\x1cv\x07@\xf9\xecLM\xef;\x00t\xb4\xb7\xb5\x93+\x95dO\xd50\x13\x07, \x01y\xa0\x04T\x81\x16\xd0\x03\xc6\xc0\x02\xd8\x00{\xe0\x0c\xdc\x81\x0f\x08\x00! \x02\xc4\x82\xc5\x80\x0b\x04\xe8\xbc\x12\xb0\x14\xac\x00kA\x01(\x02[\xc0\x0eP\x0e\xf6\x80\xfd\xa0\x06\x1c\x01\xc7A38\x03.\x80\xcb\xe0:\xb8\t\xee\x82\xc7\xa0\x17\x0c\x80W`\x04|\x04c\x10\x04\xe1!*D\x87T!m\xc8\x002\x83l \x16\xe4\n", '\xf9@AP\x18\x14\x0b\xc5CI\x90\x08\x92B+\xa0uP\x11T\x02\x95C\xfb\xa0Z\xe8\x18t\x1a\xba\x00]\x85z\xa0\x87P\x1f4\x0c\xbd\x83\xbe\xc2\x08L\x81\x95`M\xd8\x10\x9e\r\xb3`\x0f8\x10\x8e\x80\x17\xc1Ip\x06\x9c\x0b\xe7\xc3\x9b\xe02\xb8\x1a>\x0c7\xc1\x17\xe0\xeb\xf0]\xb8\x17~\x05\x8f"\x00!#\x0cD\x07\xb1@X\x88\x17\x12\x82\xc4!\x89\x88\x04Y\x85\x14"\xa5H5\xd2\x80\xb4"\x9d\xc8m\xa4\x17y\x8d|\xc1\xe00t\x0c\x13c\x81q\xc6\xf8c"1\\L\x06f\x15\xa6\x18S\x8e\xa9\xc14a:0\xb71}\x98\x11\xcc\x0f,\x15\xab\x815\xc3:a\xd9\xd8\x18l\x12v)\xb6\x00[\x8a=\x88=\x85\xbd\x84\xbd\x8b\x1d\xc0~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b\xee\xa6\x1b\x0e7Zn:\xdel\xed\x99\xdbs\xee\x96\xdb\xad\x0b\xb7\xbdo_\xbe\xc3\xbes\xfd\xee\xbc\xbb=\xf7"\xef=\xb8\xbf\xf0~\xef\x03\xde\x83\xa1\x87\xa9\x0f\xdf>\xca~4\xf6x\xcd\x13\xec\x93\xc2\xa7\n', 'OK\x9fi<\xab\xfe\xdd\xe4\xf7\xc6^\xfb\xde\xb3}\xde}]\xcf\xc3\x9f?\xee\xe7\xf6\xbf\xfa#\xf3\x8fo\x03\xf9/\xa8/J\x07\xb5\x07k\x87l\x86\xce\x0c\xfb\x0e\xdf|\xb9\xe0\xe5\xc0+\xf1\xab\xb1\xd7\x05\x7f*\xfeY\xf9\xc6\xf8\xcd\xc9\xbf\xdc\xff\xea\x1a\x89\x19\x19x+y;\xfe\xae\xf8\xbd\xea\xfbC\x1f\xe6|h\x1f\r\x1d}\xf61\xed\xe3\xd8\xa7\xc2\xcf\xaa\x9fk\xbe\xb0\xbet~\x8d\xfe:8\xb6\xf4\x1b\xfe[\xd9w\x93\xef\xad?\x02\x7f<\x19O\x1b\x1f\x17s$\x9cI+\x80\xa0\t\'&\x02\xf0\xee\x10\x00\xd4X\xd4+\xdc\x04\x80$7\xe5\x8b\'\x03\x9a\xf2\xf2\x93\x04\xfe\x8e\xa7\xbc\xf3d\xd8\x03\xb0\xbf\r\xf5"(\x06\xa0^\xa4j\r\x00\x06(\xd3\xd0\x9c\xb0E\x11\xee\x00\xb6\xb5\x95\xe5?#3\xd1\xd6fJ\x8b\x82\xbaK\xec\xe7\xf1\xf1\xf7\x9a\x00\xe0[\x01\xf8.\x19\x1f\x1f\xab\x1a\x1f\xff\x8e\xfao\xe4!\x00m\x19S~|"p\xe8_J\x89:\x0cUyv0\x13\xc1\x7f\xc6?\x00\xea\xa4\xff\x86H\x07*\xad\x00\x00\x01\x9biTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">\n', '   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n', '      <rdf:Description rdf:about=""\n', '            xmlns:exif="http://ns.adobe.com/exif/1.0/">\n', '         <exif:PixelXDimension>19</exif:PixelXDimension>\n', '         <exif:PixelYDimension>18</exif:PixelYDimension>\n', '      </rdf:Description>\n', '   </rdf:RDF>\n', '</x:xmpmeta>\n', '\x92\xfc\xe9\xf6\x00\x00\x01\xdcIDAT8\x11\xad\x94\xdfM\x1cA\x0c\xc6?\xcf\xcc\xbe\x11@\xa9 u\xa0\x1c\xa2\x03\x8aH\x0b\x89\x94\x16\x82\xeeJ\xa0\x88T\x90\x874\x92\xe7D,\xdc\xf3\xee\x8c\xf9ya\xc2\xe9 \x12\x87\xe2\x95\xd6\xf3\xc7\xfe\xc6\x1e\x7fc\xbb\xbb\xbdu7W\xae\xae)\x15e\xb9Rn\x9a\xbdH6+M\xae6\x984I%\x9bfK\x12\xb6B\xbb5\x15g?\x99Z5\xc6\x8b\xfb\xa4Z\x92\xbe\xfc\x18u\x88\xacW\xa7\x80\x9aR\xe3\xb08\xfbf\xbb\xf5CA\xf6\x0f\xdc\x9c\xbfW\xf6\x16\x19\xd5\xfd\xbd\x83\xe7$\xaaVH\x93+\xfa\x0f\xc2=G\xa6\x1e\xf9"\xd7\x97\x1f\x16\x1d\xbfO\xdf\x7f\xfd\x1d\xf7\xf5\x97\xd6\xba-\xa5\x90G\x01Z\xa6:\x8f\xd2\x1d\x02 \xc6]\xc7v\x1fw\xdd}\x1et\xa2\xcaN\x9a\x94\xb7K\x18\x86t\xd0e\xf2\xf8\xdb_\xdb\xb5\r\x8a\xc0&\n', '\xe0\x0fiv\x90}\xa7\x0e\xd8\x9d\xfb|\xd7\xce=\xc3\xcb\x14<{\x8a\xac\x1bv\x1d\x0e\x1d\xa4;\xbf\xb4\x96\xa2\x88\xfcl\xbc\x19\xfd\xf3\xcfm\xf7\x7f\x93\xde\\\x1c\xa9R\xc8\xd2\xd2\xbf#{-rk\x03\xa4\x85\x1e\xaaI\xeb\x8f\'\xaf\xf5{f\xf7-|\t\xc8\xad*%\xee\xac\xc2\xde\xcd\xeap\xc0\xab\xf3\xd3x\x9aD\x14<\xcb\xb2\xdft\x8d<U\xd9@\x90\x00\x1b\x1d!\xca\xbc\x14\x19\x0e\xce\x0c\xbe\xee\xdc\xe9\xd5\xea\x1dl"\x00\x1f\x82\n', '\xf2\xb8x|\x88Me\x98]\x80\xaaE\xce\xf0\xc5(s\xe5\x13@\xf4&N}\x92\xf5\xea\x88\t\xb9\x10\xce\x90*\xfb\x94q\xc6>\xb8J\x8eeyM\xac\xe5\x16,6e\x98\x9chK\xd1\xb2\xc28\xee"d}v\xbc\x90(z\x9f\xe1\x14Y\x84\xa5\x91F\x99y\xe2t\r\xfb3\x8e\xd0\x8d-\xc0"\xf7\x16\xa4\xe1\x9d1\xa4\x19\xbaf\x80\x97\xce\xb2DOTX+s\xd9\x14N\x98Y#3\x0e\x8b\xfey\x0f\x08\xf5\xf5\xc8\xe0\xdd\\\x98\x00\x00\x00\x00IEND\xaeB`\x82']:

R, 189 bytes


With indents for clarity:


I'm shamelessly stealing the method from an old answer of mine: I take the base-2 representation of 16 numbers, make it into a 16x16 matrix of 1s and 0s and plot it as is.

Screenshot of the result


Google Blockly, 140 blocks




Will add an explanation if requested. Try it here

Suggestions to reduce the massive function on the left are welcome!


Python 2, 211 bytes

from PIL import Image

05AB1E, 49 bytes


Try it online!

  • 2
    \$\begingroup\$ Hm. Assuming that ASCII characters are standing in for pixels here, this isn't "at least 64x64 pixels." \$\endgroup\$
    – DLosc
    Commented Mar 22, 2017 at 5:20

Excel VBA, 252 246 245 237 Bytes

Saved 6 bytes thanks to Taylor Scott.
Saved another 8 bytes thanks to inspiration from Taylor Scott

Sub p()
Set s=Shapes.AddShape(106,0,0,99,82)
With s.TextEffect
End With
End Sub

The code must be run from a worksheet's code page and will add the shape to that worksheet. It's nothing fancy but it does directly use the rounded rectangular callout upon which the icon is based. (For AddShape, 106 corresponds to msoShapeRoundedRectangularCallout.)


Formatting doesn't add much but it does make it easier to read:

Sub p()
    Set s = Shapes.AddShape(106, 0, 0, 99, 82)
    With s.TextEffect
        .Text = "PCG"
        .FontSize = 56
        .Alignment = 2
    End With
    s.TextFrame2.WordWrap = 0
    s.Adjustments.Item(1) = 0.1
    s.Adjustments.Item(2) = 0.9
    s.Line.Visible = 0
    s.Fill.ForeColor.RGB = 14659682
End Sub

There's also a one-line solution meant to be run in the immediate window that is 1 byte longer:

Set s=Sheet1.Shapes.AddShape(106,0,0,99,82):s.TextEffect.Text="PCG":s.TextEffect.FontSize=56:s.TextEffect.Alignment=2:s.TextFrame2.WordWrap=0:s.Adjustments.Item(1)=.1:s.Adjustments.Item(2)=.9:s.Line.Visible=0:s.Fill.ForeColor.RGB=14659682
  • \$\begingroup\$ You can get the bytecount down by removing the () in p() and converting With ActiveSheet. ... to With[Sheet1]. ... \$\endgroup\$ Commented Sep 27, 2017 at 20:29
  • \$\begingroup\$ @TaylorScott Dropping the parentheses is a good point and something I've previously ignored when removing auto-formatting. I'm not sure about assuming that the first sheet is named Sheet1, though. I suppose we can presume the user runs the code in a new file. \$\endgroup\$ Commented Sep 27, 2017 at 22:04
  • \$\begingroup\$ I think that because we can already assume that the user is taking input from clear cells or that a variable is uninitialized and at its default state that assuming the user is on the default Sheet1 object should probably be an accepted norm so long as you mention that that is part of the input/output condition as part of your solution \$\endgroup\$ Commented Sep 27, 2017 at 23:42
  • \$\begingroup\$ So apparently there is a Sheet1 object - so you can drop a byte by replacing With[Sheet1]. with With Sheet1. \$\endgroup\$ Commented Nov 12, 2017 at 16:56
  • \$\begingroup\$ @TaylorScott Ha, of course there is. If we assume it's a new, blank file, then Sheet1 is just the default code name of the first sheet. That's a nice 0.4% byte reduction. \$\endgroup\$ Commented Nov 13, 2017 at 15:59

MATLAB, 153 150 140 bytes

a=65535;imshow(imresize(dec2bin([16380,a,a,a,36465,46511,36329,48557,48755,a,a,32766,16380,32*[7 6 4]],16)-47,8,'n'),[1 1 1;0.39 0.69 0.88])

The code takes an array of 16bit numbers (sadly there is no way of encoding them that reduces the byte count apart from reading from a presaved binary file). EDIT: With a little bit of creativity in how the array is made, I've saved 3 bytes, and with a little bit more and an extra variable, I can save another 10 on top of that.

With this array, it is converted to a binary string where an ascii '1' represents blue and an ascii '0' is white. The array is 2D at this point because each of the 16 numbers becomes a 16 character string.

I subtract 47 to convert this into an array of 1's and 2's (needed for the next bit), where each element represents one pixel. Again this remains as 2D and is our image data.

The image is then scaled up by a factor of 8 using nearest neighbour to produce an image which is at least the required 64x64px minimum size - in fact it is 128x128 because somehow I divided 64 by 16 to get 8 >_< (don't ask!).

Finally this is displayed using a colour map where any 1 becomes white and any 2 becomes the required #62B0DF shade of blue.

This is the output:



Processing, 211 bytes

noStroke();int[]n={49155,0,173175182,1245866062,12674,-2147418112,-117456893,-16777985};for(int x=0;x<256;x++){if(((n[floor(x/32)]>>(x%32))&1)>0)fill(255);else fill(98,176,223);rect(4*(x%16),4*floor(x/16),4,4);}

Storing the pixels inside signed integers (seems to be the most efficient way, I'll maybe try 2^64 integers) and then printing them in a frame.

enter image description here


Swift (Playground), 599 Bytes

import UIKit;class P:UIView {var b=UIBezierPath();func a(x:CGFloat,y:CGFloat){b.addLineToPoint(CGPoint(x:x,y:y))};override func drawRect(rect:CGRect){UIColor(red:0.384,green:0.690,blue:0.875,alpha:1).setFill();UIBezierPath(roundedRect:CGRectMake(0,0,200,159),cornerRadius:45).fill();b.moveToPoint(CGPoint(x:102, y:146));a(102,y:200);a(157,y:146);a(102,y:146);b.closePath();b.fill();"PCG".drawInRect(CGRectMake(35,41,200,121),withAttributes:[NSFontAttributeName: UIFont(name:".AppleSystemUIFontBold",size: 64)!,NSForegroundColorAttributeName:UIColor.whiteColor()])}}
P(frame: CGRectMake(0,0,200,200))

I decided to give it a go, since drawing in Swift is pretty straightforward, and it's not usually golfed like this. Ended up loosing precious bytes with the text... Damn you NSDescriptiveVariableNames!

Here's how it looks in the playground:


I think I could golf it more by aliasing things like CGRectMake, grouping objects in the a function etc.

  • \$\begingroup\$ Couldn't you remove leading zeroes from floats, like 0.384 to .384? or does swift not support that? \$\endgroup\$
    – sagiksp
    Commented Mar 21, 2017 at 8:40

PHP, 145 bytes, not competing

for(;$i<64;)echo strtr(sprintf("%016b\n",[49155,0,0,0,29070,19024,29206,16978,16780,0,0,32769,49155,65311,65343,65407][$i++/4]),["####","    "]);

I should use non-blank and colors instead, but I´m too tired atm.
Guess that will add 10 bytes or so to the count, maybe more.

  • 2
    \$\begingroup\$ Why is it non-competing? \$\endgroup\$ Commented Mar 22, 2017 at 23:15
  • \$\begingroup\$ @KodosJohnson It has no colors. And the OP said "non-whitespace characters" \$\endgroup\$
    – Titus
    Commented Mar 23, 2017 at 3:09

Excel VBA, 178 Bytes

Anonymous VBE Immediate window function that takes no input and outputs the PCG Favicon (exactly as in the prompt above) to the range


PCG Favicon


C (gcc), 188 bytes

y;main(x){int d[]={16380,~0,~0,~0,36465,62893,38833,46525,52861,~0,~0,32766,16380,1792,768,256};for(;y<64;y++){for(x=0;x<16;)printf("\33[48;5;%dm%*s",(d[y/4]>>x++)&1?14:7,8,"");puts("");}}

Try it online!

Uses ANSI escape codes to print 128 horizontal and 64 vertical colored spaces.

ANSI PCG (Image resized.)


C++ with SFML, 607 bytes

using namespace sf;using c=Color;using x=Vector2f;RenderWindow w(VideoMode(324,324),"");void p(){RectangleShape r({224.f,144.f});r.setFillColor(c(98,176,223));Vertex v[3]={x(162,324),x(243,224),x(162,224)};for(int i=0;i<3;++i)v[i].color=c(c(98,176,223));Font f;if(!f.loadFromFile("a.ttf"))return;Text t("PCG",f,150);t.setPosition(50,20);while(w.isOpen()){Event e;while(w.pollEvent(e))if(e.type==0)w.close();w.clear(c::White);for(int i=0;i<628;++i){r.setPosition(50+cos(float(i)/100.f)*50,50+sin(float(i)/100.f)*50);w.draw(r);}w.draw(v,3,PrimitiveType(3));w.draw(t);w.display();}}

Code that calls the function :

int main() {

Requirements :

  • You need to have a valid ttf file called a.ttf in the current directory where the executable is running, so it can load the fonts to display the text

  • You need to have the corresponding SFML DLLs in the current directory where the executable is running

Result :

PPGC Icon with C++ and SFML

Explanations :


using namespace sf;
using c=Color;
using x=Vector2f;

//Create the window that will display stuff. 324x324 dimensions
RenderWindow w(VideoMode(324,324),"");

void p(){

    //Creation of the rectangle
    RectangleShape r({224.f,144.f});
    r.setFillColor(c(98,176,223)); //Logo Color wanted

    //Vertex to draw a blue triangle
    Vertex v[3]={x(162,324),x(243,224),x(162,224)};
    for(int i=0;i<3;++i)

    //Creation an load of the font
    Font f;

    //Creating the text object that will be used to draw the PCG text
    Text t("PCG",f,150);

    //Main loop, will run while the window is open
        Event e;
            //sf::Event::Close int value is 0
            //It will be triggered if you click on the red cross, or press Alt+F4

        //Clear the window in white

        //6.28 = 2*PI, the number of radians that nearly equals 360 degrees
        for(int i=0;i<628;++i){
            //It draws 628 rectangles, the top left part of the rectangle will do a circle
            //Same for every points of the rectangle

        //sf::PrimitiveType::Triangle int value is 3
        //Draw the text

tcl/tk, 113

grid [canvas .c]
.c cr o 2 2 66 48 -f #62B0DF
.c cr t 36 24 -te PCG -fi #FFF
.c cr p 30 66 30 47 44 47 -f #62B0DF

Tcl/tk, 144

grid [canvas .c]
.c create oval 2 2 66 48 -fill #62B0DF
.c create text 36 24 -text PCG -fill #FFF
.c create poly 30 66 30 47 44 47 -fill #62B0DF

pcg logo


Not the answer you're looking for? Browse other questions tagged or ask your own question.