Skip to main content
Commonmark migration
Source Link

#Python, 420

Python, 420

from PIL import Image,ImageDraw
B=0,77,117
I=Image.new('RGB',(300,300),(0,168,142))
r=ImageDraw.Draw(I).rectangle
for x,y,c in['7172737a98cde670123456bcd70112233456666778888888bcde23232323331111300000003333'[x::26]for x in range(26)]:exec'r([W,W,14+W,14+W],[(168,108,185),(247,58,58),(90,166,216),B][%s]);'.replace('W','2+20*0x%s')%(x,y,x,y,c)
r([162,142,296,156],B)
r([142,82,156,136],B)
r([142,162,156,276],B)
I.show()

#Python, 420

from PIL import Image,ImageDraw
B=0,77,117
I=Image.new('RGB',(300,300),(0,168,142))
r=ImageDraw.Draw(I).rectangle
for x,y,c in['7172737a98cde670123456bcd70112233456666778888888bcde23232323331111300000003333'[x::26]for x in range(26)]:exec'r([W,W,14+W,14+W],[(168,108,185),(247,58,58),(90,166,216),B][%s]);'.replace('W','2+20*0x%s')%(x,y,x,y,c)
r([162,142,296,156],B)
r([142,82,156,136],B)
r([142,162,156,276],B)
I.show()

Python, 420

from PIL import Image,ImageDraw
B=0,77,117
I=Image.new('RGB',(300,300),(0,168,142))
r=ImageDraw.Draw(I).rectangle
for x,y,c in['7172737a98cde670123456bcd70112233456666778888888bcde23232323331111300000003333'[x::26]for x in range(26)]:exec'r([W,W,14+W,14+W],[(168,108,185),(247,58,58),(90,166,216),B][%s]);'.replace('W','2+20*0x%s')%(x,y,x,y,c)
r([162,142,296,156],B)
r([142,82,156,136],B)
r([142,162,156,276],B)
I.show()
the former answer was incorrect
Source Link
dieter
  • 2k
  • 15
  • 18

#Python, 416420

from PIL import Image,ImageDraw
j,_B=0,a77,I=str117
I=Image.replacenew('RGB',(300,0300),Image.new('P'0,(15168,15142))
r=ImageDraw.Draw(I).putpaletterectangle
for x,y,c in['7172737a98cde670123456bcd70112233456666778888888bcde23232323331111300000003333'[x::26]for x in range([026)]:exec'r([W,77W,11714+W,14+W],[(168,108,185),(247,58,58),(90,166,216,0,168),142]B][%s])
I;'.putdata(map(int,j(j(jreplace('a4443aa0a43aa40a3aa4404443aaa44044b44404ba00444222a442c1111111ba44ba44ba440444b440ab40a4b0a444',"c"'W',"0"*8'2+20*0x%s')%(x,"b"y,"0aa")x,"a"y,'4'*4))c)
I=I.resize(r(_[162,_)142,296,156],B)
exec('ImageDraw.Draw(I).rectangler([%s][142,4);a+=10;'*2%('a82,0156,4+a136],_'B)
r([142,'0162,a-10156,_276],a-6')B)*16
I.show()

#Python, 416

from PIL import Image,ImageDraw
j,_,a,I=str.replace,300,0,Image.new('P',(15,15))
I.putpalette([0,77,117,168,108,185,247,58,58,90,166,216,0,168,142])
I.putdata(map(int,j(j(j('a4443aa0a43aa40a3aa4404443aaa44044b44404ba00444222a442c1111111ba44ba44ba440444b440ab40a4b0a444',"c","0"*8),"b","0aa"),"a",'4'*4)))
I=I.resize((_,_))
exec('ImageDraw.Draw(I).rectangle([%s],4);a+=10;'*2%('a,0,4+a,_','0,a-10,_,a-6'))*16
I.show()

#Python, 420

from PIL import Image,ImageDraw
B=0,77,117
I=Image.new('RGB',(300,300),(0,168,142))
r=ImageDraw.Draw(I).rectangle
for x,y,c in['7172737a98cde670123456bcd70112233456666778888888bcde23232323331111300000003333'[x::26]for x in range(26)]:exec'r([W,W,14+W,14+W],[(168,108,185),(247,58,58),(90,166,216),B][%s]);'.replace('W','2+20*0x%s')%(x,y,x,y,c)
r([162,142,296,156],B)
r([142,82,156,136],B)
r([142,162,156,276],B)
I.show()
Source Link
dieter
  • 2k
  • 15
  • 18

#Python, 416

from PIL import Image,ImageDraw
j,_,a,I=str.replace,300,0,Image.new('P',(15,15))
I.putpalette([0,77,117,168,108,185,247,58,58,90,166,216,0,168,142])
I.putdata(map(int,j(j(j('a4443aa0a43aa40a3aa4404443aaa44044b44404ba00444222a442c1111111ba44ba44ba440444b440ab40a4b0a444',"c","0"*8),"b","0aa"),"a",'4'*4)))
I=I.resize((_,_))
exec('ImageDraw.Draw(I).rectangle([%s],4);a+=10;'*2%('a,0,4+a,_','0,a-10,_,a-6'))*16
I.show()