Insights

Drawing a clothing line in code

Drawing a clothing line in code

I drew a whole clothing line without opening a drawing app. Every design in it is code: Python sets the type, draws the baton and a few hairline figures, and renders the result at full print size, front and back.

The jokes are the kind only a developer would wear. 200 OK beside a server sliding out of its rack. least privilege under a padlock with an orange keyhole. undo, with the baton standing upright as the cursor. est. localhost, for the address where every project of mine starts life.

Four hoodie backs from the line, each shown twice: first on a light ground in near-black, grey and orange, then on black in cream, grey and orange. 200 OK under an isometric server rack with one orange server pulled out, least privilege under a padlock with an orange keyhole, undo with an orange cursor over a short log of keystrokes, and est. localhost in large stacked type.
Four of the backs, in both colourways. The orange never changes.

Why code, for shirts

A clothing line is a system more than a set of pictures. The same canvas, the same inks, the same placement and the same type have to hold across every piece, or the rack looks like it came from five shops. Written as code, all of that lives in one place. The designs only say what is theirs: which words, which drawing, which sleeve.

That also makes the line cheap to change. If a shared rule moves, say how tightly the display type sits, it moves once, and every shirt is drawn again from scratch. Nobody nudges sixty files by hand.

Three inks, and a check that can say no

Each file gets three flat inks at most: a main colour, a grey and the studio orange. No gradients, no soft shadows, nothing half transparent except the very edges of letters. Lines stay well above the thinnest stroke a direct-to-garment printer can hold.

Rules like these drift unless something enforces them, so the last step is an audit. It counts the inks in every file and measures the art against the print box. A front that runs past ten inches wide, or art that creeps too close to an edge, stops the whole run. Since every file is generated, the fix always goes into the design's code, never into the file.

Diagram: a design is drawn by a script, rendered at 12 by 16 inches and 300 dpi, audited for three inks and the print box, then handed to Printful. Two colourways below: near-black, warm grey and orange for a white hoodie, and cream, lighter grey and orange for a black hoodie.
Every design takes the same four steps, in both colourways.

Two hoodies, one canvas

Each design is made for exactly two garments: a white hoodie printed in ink, and a black hoodie printed in cream. On the black one a few shapes are left unprinted on purpose, so the fabric itself becomes part of the drawing. Every file, front or back, sits on the same 3600 by 4800 pixel canvas, which means it lands in the same spot whenever it is placed.

The fronts are wide and short, high on the chest and well clear of the pocket. The backs carry the big statement, and most of them close on the Ulric lockup. Each design also pairs with a strip that runs down one sleeve, shoulder to cuff: HTTP/1.1 200 OK on one, $ chmod 600 on another, ctrl+z ctrl+z on a third.

Every word is set in Newsreader, the serif this site uses, with Martian Mono kept for the lines a terminal would print. Nothing in the set is framed. There are no boxes, borders or rules, so the outline of each print is simply the weight of its type and drawings.

Next, the files go to Printful, and from there into a shop.

Related

← All insights