art
clip art, gradients, QR codes, images, animation; frames, fractals, games below
Example results generated on 2026-10-08. Ones using
now,todayor randomness will differ when you run them: press Run on any example to run it in your browser, after editing it if you like.
img modes
# "blocks" (default): two pixels per character in full color, for truecolor terminals
# "ascii": brightness as " .:-=+*#%@", pastes anywhere
# "braille": Floyd–Steinberg dithered dots, the sharpest in black and white
animate
# a glider crossing the screen: animate(|i| life("glider", i), 8, 40)
# a fractal growing: animate(|i| fractal("tree", i + 1, 40), 2, 7)
Submodules
| module | about |
|---|---|
| frames | boxes, cowsay; art side by side, stacked, overlaid, mirrored, rotated, scaled |
| generative | L-systems, fractals, the Mandelbrot set, cellular automata, mazes, starfields |
| games | chess boards from FEN, playing cards, dice faces |
| figlet | big-letter banners in FIGlet fonts like slant and shadow, or any .flf file |
Functions
| function | description |
|---|---|
clipart(name?: str) | a piece from the gallery, or the list of names |
rainbow(s: str) | color each character along a diagonal rainbow, for truecolor terminals |
gradient(s: str, from: str|list, to: str|list) | fade text left to right between two colors, for truecolor terminals |
qr(text: str, ec?: str) | a scannable QR code in half blocks, light on dark; ec is the error correction level “L”, “M” (default), “Q” or “H” |
segments(s: str|int) | big seven-segment digits for 0-9, A-F, - . : and spaces |
img(path: str, width?: int, mode?: str) | draw an image file width characters wide (default: the terminal’s, or 80); mode is “blocks” (default), “ascii” or “braille” |
animate(frames: list|fn, fps?: num, count?: int) | draw frames one after another in place, fps a second (default 10). A list plays count times (default once); a function gets the frame number from 0 and plays count frames (default 60). Off a terminal only the last frame prints |
clipart
clipart(name?: str): a piece from the gallery, or the list of names
clipart("owl")
# → ,_,
# → (O,O)
# → ( )
# → -"-"-
clipart().len
# → 17
rainbow
rainbow(s: str): color each character along a diagonal rainbow, for truecolor terminals
"rainbow".rainbow
# → rainbow
See also: gradient, strip_ansi
gradient
gradient(s: str, from: str|list, to: str|list): fade text left to right between two colors, for truecolor terminals
gradient("sunset", "gold", "crimson")
# → sunset
qr
qr(text: str, ec?: str): a scannable QR code in half blocks, light on dark; ec is the error correction level “L”, “M” (default), “Q” or “H”
qr("zil")
# → █████████████████████████████
# → █████████████████████████████
# → ████ ▄▄▄▄▄ █▄▀▄███ ▄▄▄▄▄ ████
# → ████ █ █ █▀▄██ █ █ █ ████
# → ████ █▄▄▄█ █ █ ▀▄█ █▄▄▄█ ████
# → ████▄▄▄▄▄▄▄█ █▄▀ █▄▄▄▄▄▄▄████
# → ████ ▀██ █▄▄▄█▀ ▀▄▄ ▄▄█▀▄████
# → ████▀▄▄▀▀▀▄ █▄▀▄█▀ ▄ ██▄▀████
# → ████████▄█▄█ ██ ██▀█▄█████
# → ████ ▄▄▄▄▄ █▄█ ▀ ▄█▀█ █ ▀████
# → ████ █ █ █▄ ▀ ▀█▄ ▄▀▄ ████
# → ████ █▄▄▄█ ██▄▀▄█▀ ▄ ▄ ██████
# → ████▄▄▄▄▄▄▄█▄▄▄█▄▄▄███▄█▄████
# → █████████████████████████████
# → ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
See also: url_build
segments
segments(s: str|int): big seven-segment digits for 0-9, A-F, - . : and spaces
segments("12:45")
# → ▄▄ ▄▄
# → █ ▄▄█ • █▄▄█ █▄▄
# → █ █▄▄ • █ ▄▄█
segments("C0FFEE")
# → ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄
# → █ █ █ █▄▄ █▄▄ █▄▄ █▄▄
# → █▄▄ █▄▄█ █ █ █▄▄ █▄▄
img
img(path: str, width?: int, mode?: str): draw an image file width characters wide (default: the terminal’s, or 80); mode is “blocks” (default), “ascii” or “braille”
img("cat.png")
img("logo.jpg", 40, "ascii")
img("photo.png", 60, "braille").negative
animate
animate(frames: list|fn, fps?: num, count?: int): draw frames one after another in place, fps a second (default 10). A list plays count times (default once); a function gets the frame number from 0 and plays count frames (default 60). Off a terminal only the last frame prints
animate(|i| life("glider", i), 8, 40)
animate(["|", "/", "-", "\\"], 12, 5)
More examples
gallery
# what's in it
clipart()
# → ["cat", "dog", "owl", "bunny", "fish", "duck", "bat", "snail", "crab", "ghost", "skull", "coffee", "rocket", "house", "tree", "cactus", "heart"]
# a cat in a box
clipart("cat").boxed("round")
# → ╭─────────╮
# → │ /\_/\ │
# → │ ( o.o ) │
# → │ > ^ < │
# → ╰─────────╯
# pride
banner("zil", "slant").rainbow
# → _ __
# → ____ (_) /
# → /_ / / / /
# → / /_/ / /
# → /___/_/_/
# measure colored art
rainbow("hi").strip_ansi.len
# → 2
# a link for your phone
qr("https://github.com/zanbowie138/zil")
# → █████████████████████████████████████
# → █████████████████████████████████████
# → ████ ▄▄▄▄▄ █▀ ▀█▀▀▄ ███ ▄▄▄▄▄ ████
# → ████ █ █ █ ▄▀█▀▄█▄▀▀▄ █ █ █ ████
# → ████ █▄▄▄█ ██ ▀████ ▄ ▄▄ █ █▄▄▄█ ████
# → ████▄▄▄▄▄▄▄█ █ █ █ ▀ █▄█▄█▄▄▄▄▄▄▄████
# → ████ ▀▀█▀█▄▀ ▄█▀▄▀██▀▄█▀█ ▄▀▀▄ █████
# → ████▀█▄ ▀▀▄▀ ▄▀█▀ ▄▄▀▄█▀█▀██▄▀███████
# → ████▄██▀▄▀▄▄ ▀▄▀ ▄█▀ ▀▀▀▀█ ▀██▀ ████
# → █████▄▀▄█ ▄█▄ █ ███▄ █▄▀▄▄█▀ ▄ █▀████
# → ████ █▀ ▀▄▄▀▄▀▄▀█▀▀▀▀▄▀ █▄▀ ▀▄ ▀▀████
# → ████ ▄ █▀▄▄█▀▄██▀▀█ ▄▄█▄▀█▀█▄▄██▄████
# → ████▄██▄▄▄▄█ ▀█▀██ ▀▄▄▄▄ ▄▄▄ ▀▄▄▄████
# → ████ ▄▄▄▄▄ ██ ▄ ▀█▀ █▄ █▄█ ▄▄█▀████
# → ████ █ █ ██▀▄ ▀ ▀▄█▄ ▄▄▄ ▀▄ ████
# → ████ █▄▄▄█ ██▄ ▄▀▀▄▄▀▄▄▄▄▄ ▄ ▄▀████
# → ████▄▄▄▄▄▄▄█▄▄███▄██▄▄▄▄██▄▄▄█▄██████
# → █████████████████████████████████████
# → ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
# a big clock
segments(now.format("%H:%M"))
# → ▄▄ ▄▄ ▄▄ ▄▄
# → █ █ █ • █▄▄ █▄▄█
# → █▄▄█ █ • ▄▄█ █▄▄█