← HomeAll tools · 中文
Paper studio · drawn live on Canvas

Code Card Maker: one snippet, one share-worthy card

Paste code in, and Canvas paints the mac window, traffic lights and colored tokens live; pick a background and palette, drag the sliders, export a 2x PNG straight to the group chat.

Cards today: 0 · last export —

The card every change below repaints live

Background 8 kinds · gradient / grid / noise

Code palette 4 window schemes

Settings drag to change - what you see is what you export

Code paste your own snippet - long lines wrap automatically

Code, watermark and settings live only in this device's browser - no upload, no sign-in. Clearing the cache or switching devices loses them. To erase everything, use "Clear my data" in the footer.

Three steps to a post-ready image

Paste → pick a background → export. The defaults already look presentable: the page opens with a sample card, and pasting your own snippet swaps it right in. Eight backgrounds (4 gradients, 2 grids, 2 noise), four palettes, every change repainted instantly - plus a "today's pick" background that rotates by date.

Can't decide? Hit "Shuffle": background and palette roll together - export if the combination sings, roll again if it does not. The 2x PNG stays sharp full-screen in chat apps and social feeds.

A hand-written highlighter that fails gracefully

The page ships a ~60-line tokenizer covering common JS / TS / Python / CSS syntax: three comment styles (//, #, /* */), three quote flavors, template strings, numbers, keywords, call sites and CamelCase type names. If parsing fails, the card falls back to monochrome text and keeps drawing, with a note under the preview - never an error or a blank page. Tick "Plain text mode" to force monochrome up front.

Lines wider than the card wrap character by character using measured glyph widths (CJK-friendly), so nothing gets cut off or bleeds past the window edge.

Specs and limits

DrawingCanvas 2D, one pass: mac traffic lights, window title, line numbers, code, decorative background, watermark
Backgrounds8: Dusk/Deep Sea/Peach/Violet gradients, Linen/Graphite grids, Charcoal/Moss noise; today's pick rotates by date
Palettes4 window schemes (Night Blue, Night Pop, Parchment, Forest), each with 8 token colors
ControlsWidth 480-880 · font 12-20 · radius 0-36 · padding 16-48 · shadow/line-number/plain switches · title and watermark text
Export2x PNG via local Blob; file named codecard-YYYYMMDD.png
LimitsTokenizing leans JS/Python/CSS - use plain text mode for SQL or Java generics; noise uses a fixed seed, stable across reloads

FAQ

What is a code card?
A polished image of a code snippet wrapped in a mac-style window with traffic-light dots, syntax highlighting and a decorative background - far nicer than a raw screenshot for group chats, social feeds or blog posts. It is drawn live on Canvas; nothing touches a server.
Why export at 2x PNG?
Chat apps and screens are high-DPI, and a 1x image blurs when enlarged. The tool samples at double the logical size before exporting, so it stays crisp full-screen on a phone, and PNG keeps text edges lossless.
What happens if highlighting fails?
The built-in tokenizer targets C-like and Python syntax. When an exotic language or broken fragment fails to parse, the card falls back to monochrome text and keeps rendering - never an error dialog or blank page. You can also tick "Plain text mode" to force monochrome.
Is my pasted code uploaded?
No. Tokenizing, drawing and exporting all happen inside the browser Canvas and the page sends no requests. Code, watermark and settings live only in this device's localStorage, and the footer has a clear-data button.