ROFL Design System sections
06 / ILLUSTRATIONS
Accepted and rejected examples, arrow and spacing rules with bad-and-better pairs, Permanent Marker callouts, color roles, shapes, and an illustration brief.
Agent Instructions / illustrations
Create a KIRUPA teaching illustration. Read /design/sections/illustrations.md and inspect its BFS and Merkle Tree images first. Use /design/illustrations.json for sources, colors, fonts, and licenses. State the figure's teaching point. Show recognizable objects with consistent emoji-style or flat colorful artwork, quiet structural lines, and rounded containers; keep icons clear of borders. Keep a short callout arrow's tail near its text and its head near the target. Follow the Arrow rules section and its bad-and-better pairs: tip just short of the visible outline, never inside it (a grouped icon and label can be one target); a straight last segment in line with the head; rounded 16-28px elbows and shared fan-out trunks, not squeezed S-curves, diagonal heads, or tiny hooks. Callouts start at their words, or are grouped with them like the symmetric Not equal! bracket, curve gently along their whole length and stop 10-16px from the visible glyph, not the image box. Keep sibling gaps equal; never let shapes nearly touch. Inspect every arrow and gap. Keep annotations out of the reading path, and objects, coordinates, and crop stable across states. Never let color alone carry meaning. Use Permanent Marker only for short callouts and monospace for data. Keep arrows and values consistent with the prose and code. Do not theme-tint raster art. Keep editable source, portable fonts, licenses, alt text, and an introductory sentence. Check article and phone sizes in Light and Dark. Follow WCAG 2.2 AA for new or changed content: semantic HTML, keyboard access, visible focus, readable contrast in every theme, text alternatives, labeled controls, and explicit errors. Support zoom/reflow, respect reduced motion, and keep sound optional. Read /design/sections/accessibility.md for acceptance checks. Report unresolved barriers; automated checks alone do not establish conformance.
A KIRUPA teaching illustration shows the objects, relationships, and state that the explanation depends on. Readers should be able to locate the character, follow a connection, or see what changed before reading every label. The references here come from Auto-navigating our Grid using BFS and Understanding Merkle Trees. Their drawing style is separate from the surrounding site's theme.
Rejected example
This supplied example is rejected as an illustration-style reference. Both panels are part of the rejected image; the lower organizer is not an approved example. Words stand in for the physical tools, and the comparison shows no recognizable objects or action. It already has rounded corners and restrained colors, so adding those features alone cannot fix it. A table can be useful when the data is the subject, but labeling two boxes does not illustrate a physical metaphor:
Rejected. Rounded corners and pale fills do not make a physical metaphor visual. Show the tools and the relationship being explained.
Word-only tool boxes
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Redrawing the same concept
For the same concept, draw the same hammer, wrench, and screwdriver in both states. Let their arrangement show the difference. Use a short handwritten instruction and a targeted highlight to identify the wrench. This new redraw applies the guidance; it is not an image taken from a tutorial. Its editable source and self-contained SVG are available below:
New example. Keep object identity consistent, let arrangement show the comparison, and give the callout a specific target.
The same tools, visibly rearranged
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Full-size image / Download SVG / Source
Original Twemoji graphics by Twitter and contributors, CC BY 4.0, bundled graphics version 17.0.3. Fonts: Permanent Marker / Apache 2.0 and Nunito / SIL OFL 1.1. Build template.
Objects and visual vocabulary
Use recognizable objects when the explanation involves objects. In the Merkle example, folders contain files, a monitor identifies the local copy, and a globe identifies the cloud copy. Repeated folder, image, settings, and lock symbols let us compare the same hierarchy without reading every filename. Use the site's KIRUPAicons for consistent colorful icon artwork, or draw simple flat objects that belong to the same visual family. Do not mix platform-native emoji renderings, glossy stock illustrations, and unrelated icon packs in one sequence:
Good reference. Repeat the same symbols and layout so the reader can compare state without decoding a new picture.
Recognizable objects and matching structures
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Shapes, lines, and spacing
Draw clean flat geometry with rounded corners on objects that benefit from them: obstacle tiles, containers, buttons, and annotation boxes. Leave visible padding between each object and the surrounding borders or dividers. If an icon looks cramped, make it smaller instead of letting it touch the boundary. Judge this gap from the painted artwork, not empty space inside its SVG. Keep structural geometry accurate. The BFS grid has square cells and straight shared boundaries; its rock containers are rounded. Use round line caps and joins on arrows, a consistent stroke weight, and enough space that pointers do not cross labels. Avoid making every element a heavy bordered card, or adding perspective, glass effects, and shadows that do not explain a relationship:
Good reference. Use friendly object geometry without distorting the coordinate system. Reserve stronger color for the relationship being measured.
Rounded objects in a precise grid
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Color and emphasis
Keep the canvas white or near-white, with quiet gray structure and dark readable labels. Use pale blue, yellow, green, or lavender fills to mark a region, then stronger color for its boundary, number, arrow, or changed value. The sampled palette below records the BFS artwork, not new global CSS tokens. Assign colors to explicit roles within an explanation and keep those meanings stable. Do not recolor a diagram with the page palette or assume a sampled accent is safe for small text. Here, blue marks reached cells, dashed outlines identify the newly reached cells, and lavender distinguishes the adjacent rocks:
Good reference. Use fill, number, and outline together to distinguish the new search frontier from blocked cells.
First search ring
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Sampled BFS palette
#FFFFFFDrawing surface#D9DEE5Quiet grid structure#D3D9E0Obstacle tile fill#A9B3BDObstacle tile outline#D8EDFFPreviously reached area#B3DAF9Newly reached cells#DDD0F4Adjacent blocked cells#FFF1C7Destination alignment#DDF3CFSelected route region#E0605ADistance annotation
Consistent sequences
When showing an algorithm, reuse the same coordinate system, object positions, scale, labels, and crop. Change only the state being explained. The next BFS frame keeps Zorb, the rocket, and all four rocks in place while adding the cells reached in two steps. Moving a rock or shifting the grid between frames would make the reader solve a different problem:
Good reference. Hold the scene still while the algorithm's state changes.
Second search ring
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Focus and detail
Reduce detail when it competes with the current explanation. This BFS frame keeps Zorb and his immediate neighbors clear while fading the surrounding grid. The faded content still provides context. Do not fade the subject, a necessary label, or an error until it becomes unreadable, and explain what the change in emphasis means:
Good reference. Use selective emphasis to distinguish what the actor can inspect from what the reader can see.
Local visibility
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Arrows and technical accuracy
Use arrows for a specific relationship, with unambiguous endpoints. Showing every breadcrumb is useful when explaining predecessor links, but it is a poor choice when the task is to identify one route. Compare the unfiltered frame with the focused version below. Its green arrows point from discovered cells back toward Zorb; they are breadcrumbs, not the forward walking direction. Match every arrow, coordinate, count, and label to the accompanying explanation and code:
Avoid for a single-route explanation. This is not inherently an incorrect diagram. It becomes a poor choice when the explanation needs the reader to follow just one route.
All breadcrumbs at equal priority
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Good reference. Make the relevant route easy to follow without changing the underlying scene or reversing the breadcrumbs.
One route emphasized
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Handwritten callouts
Use Permanent Marker for short handwritten callouts. This is the author's confirmed font, not an identification guessed from a raster image. The Merkle reference uses the handwritten 'Not equal!' label above a bracket joining the two root hashes. Reserve this face for a few words that direct attention: 'Only this branch changes', 'Start here', or 'Not equal!'. Keep longer explanations in HTML. Do not set paragraphs, filenames, code, coordinates, or hash values in a marker font, and do not simulate handwriting by rotating ordinary sans-serif words:
Good reference. Use Permanent Marker to direct attention to one relationship, keeping filenames and values in a separate data face.
A short handwritten callout
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Why this arrow works: The Not equal! bracket is a deliberate style choice. Its two arrows are a symmetric pair centered under the label, so Gestalt grouping ties them to Not equal! without the tail touching the words. See Arrow rules.
Callout arrows
Treat the callout text and its arrow as one annotation. Start the arrow's tail right after the label, leaving a small clear gap so it does not touch the letters. Curve gently along the whole path in one swoop, never turning sharply near the head, and stop the arrowhead about 10-16px short of the target's visible edge. A detached sweep makes the reader work out which words and object belong together. Keep the pointer clear of other labels and borders.
Place the annotation in nearby open space without interrupting the explanation's reading order. In a stacked before-and-after tool comparison, place a 'Same tools' note below the organized result with a nearby upward-pointing arrow. Putting the note between the boxes can make it look like another step. Choose the direction from the label's position and its intended target; callouts do not always have to sit below a diagram. Keep these pointers distinguishable from arrows that show movement, data flow, or algorithm steps.
Arrow rules
Kirupa has had to flag the same arrow mistakes repeatedly, so treat these as hard rules for every arrow in a KIRUPA illustration, whether it shows data flow, a route, or a callout:
- Stop the head just short of the target's visible outline: about 8px from a shape, 10-16px from a glyph. The line never enters or overlaps the target.
- A grouped icon and label can be one arrow target. Point at the group and keep the gap from the group's visible edge, as in the Merkle tree view.
- Make the last segment straight and in line with the head. The final control point is collinear with the end point (a vertical or horizontal approach). Connectors keep a straight run of at least twice the head length before the tip.
- Do not squeeze an S-curve into a small gap; it bends sharply right before the head and the line no longer flows into the arrowhead.
- Route branches as straight runs joined by rounded corners of about 16-28px. A fan-out shares one trunk and splits with rounded elbows to each target.
- Arrive square to the edge you point at. No diagonal head hitting a shape at an angle or clipping its corner. An arrow tracing an existing straight connector may follow that connector's angle.
- Keep the head full size, an open chevron with arms of about 14-18px on a 4px stroke, and avoid tiny or overly sharp hooks.
- Callout arrows start right after the words, curve gently along their whole length in one swoop, never turn sharply near the head, and come into the side or top of the target. Measure the gap from the visible glyph, not the image box.
- A callout's tail can sit apart from its words when the arrangement groups them, like a symmetric bracket centered under its label in the Not equal! example. A lone tail far from its words, with nothing grouping them, is still detached.
- Keep every arrow clear of labels, icons, and other arrows; never let it graze a container border.
- Inspect every arrow in every rendered figure at full size before publishing.
Bad arrows and the better version
Each pair below connects the same objects twice: the avoided arrow on the left and the better arrow on the right, with a dashed red ring around the fault. Start with the most common mistake, an S-curve squeezed into a tight gap:
Avoid vs. better. Bad: squeezed into a small gap, the S bends hardest right before the head, so the line arrives sideways and never flows into the arrowhead. Better: straight runs joined by rounded corners, with a long straight final run into the target.
S-curve in a tight gap vs. rounded elbow
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Arrive square to the edge you point at. A head that clips a corner at an angle is ambiguous:
Avoid vs. better. Bad: a diagonal head that clips a corner leaves the reader guessing which edge, or which object, it means. Better: leave and arrive square to the edges, turning once with a rounded corner, and aim at the middle of the edge.
Diagonal head vs. straight approach
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
The tip stops just short of the target. The line never runs into the outline or the fill:
Avoid vs. better. Bad: the line crosses the outline and the head is buried in the fill, so the border, the tip, and the direction all blur together. Better: stop the tip about 8px short of the outline so every part stays readable.
Head inside the target vs. stopping short
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Keep one smooth path and a full-size head. A tiny hook hides the direction:
Avoid vs. better. Bad: a tight curl with a shrunken head hides the direction and points at nothing in particular. Better: one smooth curve, a straight finish, and a full-size head with the same stroke as the line.
Sharp tiny hook vs. one smooth curve
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
The line must flow straight into its head. Put the final control point directly above, below, or beside the end point, so the curve has finished turning before the head:
Avoid vs. better. Bad: the curve is still turning when it reaches a head that points another way, so line and head meet at a kink. Better: put the final control point directly above the end point and finish with a straight run at least twice the head length.
Bend at the head vs. collinear final segment
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Callouts follow the same rules, plus their own. A single tail starts at the words, not somewhere across the panel with nothing tying it back:
Avoid vs. better. Bad: a single tail starts across the panel from its words and loops around, with nothing to group them, so the reader has to work out which note and object belong together. Better: start right after the words and make one gentle swoop that ends in line with the head. A grouped arrangement, like the symmetric Not equal! bracket, is a different case.
Lone detached callout sweep vs. callout from the words
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Callout arrows curve gently along their whole length, never turn sharply near the head, and measure the gap from the visible glyph, not the image box. Transparent padding around an icon is not part of the icon, so an arrow that stops at the image box stops too far away:
Avoid vs. better. Bad: the arrow drops almost straight down, then hooks sharply right before the head, and it stops at the image box, more than 20px from the visible wrench because the transparent padding was counted as the icon. Better: one wide swoop from the end of the words into the side of the wrench, stopping 10-16px from the visible glyph.
Callout that drops and hooks vs. one smooth swoop
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
When one source feeds several targets, share one trunk and split it with rounded elbows instead of drawing separate curves:
Avoid vs. better. Bad: three separate S-curves bunch together at the source and bend into the outer heads. Better: share one trunk, split it at one level with rounded elbows, and give each branch a straight run into its target.
Separate S-curves vs. shared trunk
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Spacing and breathing room
Spacing follows the same discipline as arrows: consistent gaps and room to breathe. Measure gaps from painted edges, then make the layout match:
- Use equal gaps between sibling elements in a row or column.
- Give a central shape the same gap above and below, or left and right. A circle sitting 11px from the rows above and below it looked cramped; 56px fixed it.
- Never let shapes nearly touch. Move them apart or make them smaller rather than closing the gap.
- Reuse a small set of gaps, for example 24px between siblings and 48-56px between groups, measured from painted edges.
In this comparison, equal 24px sibling gaps and the same 56px above and below the circle replace cramped 11px gaps:
Avoid vs. better. Bad: the circle sits 11px from the rows above and below, sibling gaps vary, and two boxes nearly touch. Better: every sibling gap is 24px and the circle has the same 56px gap above and below, so each group has room to breathe.
Cramped, uneven spacing vs. equal gaps
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Data labels
Give data labels a separate readable type role. Filenames and hash-like values need a clear monospace face; coordinates and ordinary object labels need a clean sans-serif. The exact families of all rasterized data labels cannot be recovered from these PNGs. Bundled Nunito and kirupaCode/Departure Mono are available options for new drawings, not claims about the original files. Keep labels beside their objects. In this Merkle state, blue replacement values and visible cross-outs identify the changed file, Config folder, and Project root; the other entries retain their previous values:
Good reference. Use position, replacement labels, and cross-outs alongside color to make the changed dependency chain visible.
Changed values within a stable hierarchy
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Alternative representations
A second representation should preserve the objects and relationships from the first. The Merkle tree view uses the same folder and file symbols as the earlier directory view. Its highlighted path runs from settings through Config to Project, while the unaffected branches recede. Avoid replacing concrete objects with identical anonymous boxes when their identity helps explain the relationship:
Good reference. Keep visual vocabulary consistent when changing representations, and emphasize only the relevant dependency path.
The same objects in a tree view
LOCAL PREVIEWActivate this specimen to load its real styles. No saved preferences change.
Why this arrow works: Each arrow points at the folder icon and its label as one grouped destination, so the whole group is the target. The arrows follow the tree's own connectors and keep a clear gap from that group. See Arrow rules.
Drawing dimensions
For new vector drawings, a useful starting point is a 900px-wide artboard, roughly 32px outer padding, 2-4px structural strokes, 12-24px object corner radii, 24-28px ordinary labels, and 28-36px handwritten callouts. These are working recommendations at that artboard size, not measurements required by every existing illustration. Scale the stroke and type together. Keep arrowheads proportionate (open chevrons with 14-18px arms on a 4px stroke), allow a clear gap between a pointer and its label, and check the result at the actual article width before exporting.
Export and theme behavior
Keep an editable SVG or the original authoring file. When exporting SVG, make font and icon dependencies portable: embed permitted resources or outline a delivery copy of the text while retaining an editable text source. A font-family declaration alone does not bundle a font, and an SVG loaded through an img element cannot be assumed to fetch external fonts. For PNG, export enough pixels for the intended display size, normally 2x; keep lines and lettering sharp. Do not use CSS filters to invert a flattened drawing for dark mode. Retain a light artboard or create a separately checked dark version.
Mobile and accessibility
On narrow screens, do not shrink a dense diagram until its labels are unreadable. Provide a full-size image link, a focused crop, a stacked version, or a keyboard-scrollable region for a genuinely two-dimensional drawing. Every example here has a full-size link and a local surrounding-theme preview. The original image colors and fonts remain fixed. A source image can be a useful composition reference without being an accessibility template: new essential text still needs 4.5:1 contrast, and essential graphical distinctions need 3:1 or another equally clear visual cue.
Agent checklist
Before delivery, introduce the figure in the preceding paragraph and write alt text describing its point, not just its contents. Check the image against the exact prose and code: the same objects, coordinates, direction, counts, and state. Inspect every arrow against the arrow rules and every gap against the spacing rules. Inspect Light and Dark presentation, mobile readability, clipping, font loading, and color-independent cues. Reject decorative arrows with no target, random emoji, tiny labels, unrelated changes between frames, and word-only boxes pretending to be the objects in the example. Read illustrations.json for the palette, font files, example provenance, and production checklist.
- Use meaningful colorful objects, restrained rounded geometry, stable visual roles, and short Permanent Marker callouts.
- Keep objects inset from borders and dividers. Group each callout with its short pointer without interrupting the comparison's reading order.
- Follow the arrow rules: tips short of the visible outline, a straight final segment in line with the head, rounded elbows instead of squeezed S-curves, and callouts in one gentle swoop. Keep sibling gaps equal and never let shapes nearly touch.
- Keep new illustrations technically consistent with their prose and code; preserve scene geometry across a sequence.
- Do not treat an illustration palette as a replacement for site tokens, use marker lettering for data, or claim an unverified font match.










