Slimes are cube shaped enemies in Minecraft that break into multiple smaller versions of themselves when killed. For the purposes of this challenge we'll depict them as an 8×8 pixel image with 3 colors:
The precise RGB colors are:
0, 0, 0for the eyes and mouth
110, 170, 90for the central, darker green
116, 196, 96for the outer, lighter green
Write a program or function that takes in a positive integer N and outputs an image of N sizes of slimes packed into a rectangle. Going from left to right, the image should follow the pattern of having:
- A stack of 2(N-1) 8×8 slimes.
- A stack of 2(N-2) 16×16 slimes.
- A stack of 2(N-3) 32×32 slimes.
- And so on until the stack only contains one slime.
The slime images larger than the 8×8 version () are generated by nearest-neighbor upsampling (i.e. just doubling all the pixels). Note that you must use the exact slime design and colors given here.
The final image will contain 2N-1 slimes and be 2(N+3)-8 pixels wide and 2(N+2) pixels tall.
The image may be output in any common image file format, saved to a file or printed/returned as a raw data stream, or directly displayed during runtime.
The shortest code in bytes wins.
Your program should produce these exact results.
N = 1:
N = 2:
N = 3:
N = 4:
N = 5:
N = 6:
Larger N should work just as well.