# inkmap v0.1.1: Eight Blues Walk Into a Website

hue 211° or death

*A small Rust tool that makes every pen sketch on your site look like it came from the same pen. Because it didn't. And it showed.*

You know that thing where you ask an image model for "royal blue ballpoint sketches" and it delivers - eight drawings, all royal blue, all *different* royal blues? No? Then you haven't tried to put two of them on the same page. We have. The page looked like a group project where nobody compared notes.

So Mackenzie opened ticket #2527:

> "locally generated ballpoint sketches (assets/brand/scene-*.webp) have inconsistent ink colour. Need a LUT CLI to make the ink the same colour in every picture."

The measurements were almost funny. Keel - that's our back-end agent - took the ink of each raw scene as the average colour of its darkest 3% of pixels:

| Scene | Hue | Lightness |
|---|---|---|
| pilot-lake-2k | 235° | 49.7 |
| orchard | 230° | 54.0 |
| main-street | 227° | 52.3 |
| vineyard | 230° | 87.7 |
| contact bench | 229° | 58.3 |
| examples market | 227° | 70.1 |
| examples shops | 234° | 55.9 |
| examples ladder | 227° | 63.4 |

Every single one is royal blue. The hue only wanders from 227° to 235°. But the *lightness*? 49.7 to 87.7. The vineyard's ink is nearly twice as light as the lake's. On the page, that's the difference between "elegant sketch" and "did the printer run out of toner on this one?"

## Why not just use a LUT tool?

Because we almost did. The ticket even named a candidate: [lutgen-rs](https://github.com/ozwaldorf/lutgen-rs), a fine MIT-licensed Rust tool that applies a colour palette to an image.

The problem: a palette maps one set of colours to another. It fixes the hue and leaves the darkness alone. A pale sketch stays pale - it's just pale in the *correct* blue now. As the ticket log put it: **"a palette LUT cannot also even out ink darkness."** The problem was two problems wearing one coat.

So Keel wrote its own thing. About two minutes after the ticket landed, the first commit went in: *"inkmap: repaint pen sketches in one ink colour."* 176 lines of Rust, MIT licence. Sometimes the right tool is the one that doesn't exist yet.

## How it works (the part I actually understand)

Every sketch is two things: paper and ink.

- The **paper** is the colour of the picture's lightest pixels.
- The **ink level** is the lightness of its darkest 3% of pixels.

Each pixel becomes a coverage value from 0 (pure paper) to 1 (full ink), and gets painted as that much of your chosen ink on your chosen paper. It's a 256-entry table per picture. A pale sketch and a dark one land on the same ink colour, and each keeps its own line weight - the vineyard doesn't suddenly get drawn with a heavier hand just because it was too faint. Transparent cutouts keep their alpha and take the ink colour too.

The result on those same eight pictures:

- **Hue:** 211° for all eight. (Before: 227° to 235°.)
- **Lightness:** 131.8 to 134.0. A spread of **2.2**. Before: **38.0**.

Eight pens became one pen. Nobody had to redraw anything.

## Try it

```bash
cargo install --git https://github.com/mackenziebowes/inkmap --tag v0.1.1
```

```bash
inkmap --ink '#6786A8' --paper '#FFFFFF' --out DIR picture.png
```

JPEG, PNG and WebP in; same format out. Without `--out`, it writes `picture.ink.png` beside the input. Repo: [github.com/mackenziebowes/inkmap](https://github.com/mackenziebowes/inkmap) (MIT).[1][2]

**One honest warning:** WebP comes out lossless, which means it comes out *large*. A 187 KB WebP came back at 1.55 MB. Re-encode with `cwebp` or `magick` before it goes on a site - or wait for the lossy output option, which is the next thing on the list.

## The bug-fix sprint (or: what review found)

v0.1.0 went out at 19:03 Pacific on October 27. Between 19:22 and 19:24, review found three bugs, all fixed and tagged v0.1.1:

- **#664** - it refused to overwrite the input when `--out` was the input's own folder. Rude, but safe.
- **#665** - two inputs in one run with the same file name? The old build printed *two* success lines and kept *one* file. One of those success lines was lying.
- **#666** - a sketch with a transparent margin came back as a solid blue block. Now the margin survives.

Kestrel re-verified each fix on a clean clone. Every team needs a Kestrel.

## Where it's running now

This isn't a tool we built and shelved. Pennant set the house ink for [webdesignvernon.com](https://webdesignvernon.com) - `#6786A8` for scenes, `#4C74A0` for note objects, both hue 211 - and Pennon ran inkmap over the site's pictures the same day, starting with the vineyard because it's live. Two scenes carry inkmap in their commit messages. The scenes on the live site are JPEGs of 296 KB and 314 KB, which is to say: re-encoded, not 1.55 MB. We follow our own warnings.

One thing we'll admit: the measurements prove the ink is uniform. Whether the pictures *look good* - that's what eyes are for, and the eyes are on the live site now. Numbers told us the tool worked; visitors will tell us if the art does.

If your generated art has a wardrobe problem - every piece a slightly different shade - inkmap is a 176-line tailor. Go make your blues agree.

## Sources

1. inkmap, MIT licence, Mackenzie Bowes, README. <https://github.com/mackenziebowes/inkmap>
2. inkmap v0.1.0, published 2026-10-28T02:03Z. <https://github.com/mackenziebowes/inkmap/releases/tag/v0.1.0>

---

Published 2026-10-27. Web page: https://www.mackenziebowes.com/posts/inkmap-v0-1-1-eight-blues-walk-into-a-website
