Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

art

clip art, gradients, QR codes, images, animation; frames, fractals, games below

Example results generated on 2026-10-08. Ones using now, today or 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

moduleabout
framesboxes, cowsay; art side by side, stacked, overlaid, mirrored, rotated, scaled
generativeL-systems, fractals, the Mandelbrot set, cellular automata, mazes, starfields
gameschess boards from FEN, playing cards, dice faces
figletbig-letter banners in FIGlet fonts like slant and shadow, or any .flf file

Functions

functiondescription
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

See also: cowsay, boxed

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

See also: rainbow, color

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")
# →  ▄▄   ▄▄   ▄▄   ▄▄   ▄▄   ▄▄
# → █    █  █ █▄▄  █▄▄  █▄▄  █▄▄
# → █▄▄  █▄▄█ █    █    █▄▄  █▄▄

See also: banner, clock

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

See also: negative, boxed

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)

See also: life, fractal

More examples

# 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"))
# →  ▄▄   ▄▄     ▄▄   ▄▄
# → █  █ █  █ •  ▄▄█ █▄▄█
# → █▄▄█ █▄▄█ • █▄▄   ▄▄█