Skip to main content
Recipe number 190

Cookbook · Chapter 10 · Output & integration

A zine in black and fluorescent pink

A two-plate job, black and a fluorescent pink: duotone photographs, black that overprints, and a pink that glows in Folio.

On this page
  • Trim 148 × 210 mm
  • 2 columns, 5 mm gutter
  • IBM Plex Sans 8.8/12.4
  • Archivo Black
  • IBM Plex Mono
  • 8 pages
  • Level
  • Postext 1.84.0
  • Laid out in 166 ms
  • 212 lines of code

In short

A small music magazine printed with only two inks, black and a bright neon pink. The photographs come out in black and pink, the pink shines in the 3D view, and the print file has exactly two plates.

What you'll build

Issue 7 of Pink Noise, an invented music zine: eight A5 pages, saddle-stitched, printed on a press with two drums. One prints black and the other a fluorescent pink, and nothing else reaches the paper. The pink sets the cover title, the band across the interview opener, the questions, the pull quote and the back cover; a 30 % tint of it fills the box of listings. The three photographs are grey originals that print as duotones, black in the shadows and pink in the middle tones. Folio lays the zine open on a dark table, where the pink stands out from the paper.

This recipe answers

  • How do I print a zine in black and a fluorescent pink only, with the photographs as duotones?

The short answer

script.js · lines 20–32in full code
// The pink is a spot ink; the ink table says it is fluorescent, as the printer will be told.
// The screen paints its hex, Folio makes it stand brighter than the paper, and the PDF puts it
// on a plate of its own. The ink table also takes the name the poster files gave it.
const PINK = { name: 'PANTONE 806 C', cmyk: { c: 0, m: 77, y: 0, k: 0 } };
const pink = (hex, tint) => ({ hex, model: 'spot', spot: { ...PINK, tint } });
// The job prints these two plates and nothing else. Pictures print as duotones: each
// plate takes the grey of a pixel through its curve, [tone, ink] in percent.
const CURVES = { Black: [[0, 0], [45, 8], [100, 92]], // the shadows
  'PANTONE 806 C': [[0, 0], [35, 45], [70, 80], [100, 60]] }; // the middle tones
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51',
  inks: [{ name: 'PANTONE 806 C', aliases: ['Fluo pink'], finish: { kind: 'fluorescent' } }],
  plates: { inks: ['Black', 'PANTONE 806 C'], images: ['Black', 'PANTONE 806 C'],
    curves: CURVES } };

Two plates: black and a fluorescent pink that glows

Ingredients

Type
Archivo Black, IBM Plex Sans, IBM Plex Mono (SIL OFL 1.1)
Assets
  • crowd-900.jpg
  • guitarist-600.jpg
  • posters-560.jpg
  • A crowd at a basement gig, on the cover (Generated With Diffusion Models, original)
  • A guitarist on a small stage (Generated With Diffusion Models, original)
  • An alley wall layered with posters (Generated With Diffusion Models, original)

Method

#1 · Two plates, and the pink is fluorescent

The code is the short answer above. print.plates names the plates the job prints, Black and PANTONE 806 C, and the PDF has those two separations and no others (two-ink printing). The pink is a spot colour; its finish is given in the ink table, as it would be on the order to the printer, and makes it a fluorescent ink: it gets a plate of its own and Folio lights it brighter than the paper (finishes). images puts the photographs on both plates, and CURVES shapes each one: black only in the shadows, pink in the middle tones and easing off in the darks, so the pink never muddies the black.

#2 · The screen shows the duotone too

script.js · lines 280–305in full code
// The PDF separates the grey original through CURVES. The screen would paint it grey, so the
// picture registered for the canvas and Folio is the same grey run through the same curves:
// the black over the pink, multiplied as inks lie on paper. The PDF still gets the original.
const ink = (curve, tone) => { // a curve read at a tone, both 0–1
  const i = curve.findIndex(([x]) => x / 100 >= tone);
  const [[x0, y0], [x1, y1]] = [curve[Math.max(0, i - 1)], curve[Math.max(0, i)]];
  return (x1 === x0 ? y1 : y0 + ((tone * 100 - x0) * (y1 - y0)) / (x1 - x0)) / 100;
};
const PINK_RGB = [0xff, 0x3e, 0xa5];
async function loadDuotone(fileId, url) {
  await loadImage(fileId, url); // the grey bytes, kept for the PDF
  const grey = await createImageBitmap(new Blob([imageBytes(fileId)]));
  const canvas = new OffscreenCanvas(grey.width, grey.height);
  const g = canvas.getContext('2d');
  g.drawImage(grey, 0, 0);
  const img = g.getImageData(0, 0, canvas.width, canvas.height);
  for (let i = 0; i < img.data.length; i += 4) {
    const tone = 1 - img.data[i] / 255;
    const [k, p] = [ink(CURVES.Black, tone), ink(CURVES['PANTONE 806 C'], tone)];
    for (let c = 0; c < 3; c++) {
      img.data[i + c] = 255 * (1 - k) * (1 - p * (1 - PINK_RGB[c] / 255));
    }
  }
  g.putImageData(img, 0, 0);
  registerResourceImage(fileId, canvas.transferToImageBitmap());
}

The canvas and Folio paint a picture as its file is, so a grey photograph would show grey there, although it prints pink and black. The recipe registers a second picture for the screen: the same grey, read through the same CURVES, the black multiplied over the pink as inks lie on paper. The PDF still receives the grey original, from imageBytes, and separates it itself.

#3 · Black over pink

script.js · lines 60–74in full code
const BAND = 134; // mm from the top of the bleed to the black band
const cover = { ...bare, id: 'cover', advancedDesign: { enabled: true, minHeight: mm(150),
  slot: { elements: [
    { kind: 'image', id: 'photo', resourceId: 'crowd', fit: 'cover', focus: { x: 0.35, y: 0.5 },
      placement: at('bleed', 'top-left', 0, 0, { width: 'fill', height: mm(BAND + 4) }) },
    { kind: 'box', id: 'band', style: { backgroundColor: col('black') },
      placement: at('bleed', 'top-left', 0, BAND + 3, { width: 'fill', height: mm(90) }) },
    text('issue', '{attr.issue}', label(8, col('pink')), at('page', 'top-left', 12, 12)),
    text('title', '{titleText}', { fontFamily: DISPLAY, fontSize: pt(70), lineHeight: 0.82,
      textTransform: 'uppercase', color: col('pink') },
    at('page', 'top-left', 10, BAND + 9, { width: mm(130) })),
    text('lines', '{attr.lines}', { fontFamily: SANS, fontWeight: 700, fontSize: pt(11),
      lineHeight: 1.25, color: col('paper') }, at('page', 'top-left', 12, BAND + 55,
      { width: mm(110) })),
  ] } } };

Black is the K plate alone, set as a CMYK colour with overprint: true. Where black type or the black band of the cover meets the pink, it prints over it instead of cutting a hole, and a sheet that lands a little out of register shows no white rim. The pink title knocks out of the black, as type on a dark band should.

#4 · Folio on a dark table

script.js · lines 119–125in full code
const folio = {
  tilt: 22, yaw: -14,
  paper: { type: 'uncoated', grammage: 100, shade: '#ffffff' },
  binding: { type: 'saddleStitch', cover: 'pages' },
  surface: { type: 'plain', color: { hex: '#2b2b30', model: 'hex' } },
  lighting: { environment: 'overcast', intensity: 1.05 },
};

A fluorescent ink needs a little darkness around it to read as one. The zine lies open at the interview on a plain dark surface, under the flat overcast light, so the pink band and the pink in the photograph stand out from the white paper.

The whole recipe

Sandbox
// ═══ Postext Cookbook · Nº 190 · A zine in black and fluorescent pink ════════════════════
// https://postext.dev/en/cookbook/fluorescent-pink-zine
// Code: MIT · Text: original (CC BY 4.0) · Photographs: diffusion models
// Fonts: Archivo Black, IBM Plex Sans, IBM Plex Mono (SIL OFL 1.1) · Needs postext ≥ 1.84.0
//
// A music zine printed on two plates, black and a fluorescent pink. The pink is a spot ink
// with a fluorescent finish; the job prints those two plates and nothing else, so the grey
// photographs print as duotones and every other colour is projected onto the two inks.
import {
  buildDocumentWithFonts, renderPageToCanvas, registerResourceImage,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
import { createFolioFromDocument } from 'https://esm.sh/postext-folio';

const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'fluorescent-pink-zine';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region answer: two plates: black and a fluorescent pink that glows
// The pink is a spot ink; the ink table says it is fluorescent, as the printer will be told.
// The screen paints its hex, Folio makes it stand brighter than the paper, and the PDF puts it
// on a plate of its own. The ink table also takes the name the poster files gave it.
const PINK = { name: 'PANTONE 806 C', cmyk: { c: 0, m: 77, y: 0, k: 0 } };
const pink = (hex, tint) => ({ hex, model: 'spot', spot: { ...PINK, tint } });
// The job prints these two plates and nothing else. Pictures print as duotones: each
// plate takes the grey of a pixel through its curve, [tone, ink] in percent.
const CURVES = { Black: [[0, 0], [45, 8], [100, 92]], // the shadows
  'PANTONE 806 C': [[0, 0], [35, 45], [70, 80], [100, 60]] }; // the middle tones
const PRINT = { standard: 'pdfx4', outputProfile: 'fogra51',
  inks: [{ name: 'PANTONE 806 C', aliases: ['Fluo pink'], finish: { kind: 'fluorescent' } }],
  plates: { inks: ['Black', 'PANTONE 806 C'], images: ['Black', 'PANTONE 806 C'],
    curves: CURVES } };
// #endregion
// Black is the K plate alone, and it overprints: on the pink it prints over the ink instead of
// knocking a hole that a sheet out of register would show as a white rim.
const palette = {
  black: { hex: '#1b1a1d', model: 'cmyk', cmyk: { c: 0, m: 0, y: 0, k: 100 }, overprint: true },
  pink: pink('#ff3ea5'),
  pink30: pink('#ffc5e4', 30),
  paper: { hex: '#ffffff', model: 'hex' },
};
const col = (id) => ({ ...palette[id], paletteId: id });
const colorPalette = [...Object.entries(palette).map(([id, value]) => ({ id, name: id, value })),
  { id: 'main-color', name: 'pink (defaults)', value: palette.pink }];

const [TRIM_W, TRIM_H] = [148, 210]; // A5, an A4 sheet folded once
const MARGIN = { top: 16, bottom: 18, inner: 14, outer: 12 };
const LEAD = 12.4; // pt

The composed script.js runs as it is: paste it into any page’s module script, or open the recipe on CodePen. Recipe folder on GitHub ↗ (opens in a new tab)

Variations

With one picture plate, the photographs print as plain greyscale on black, and the pink is kept for type and boxes.

-  plates: { inks: ['Black', 'PANTONE 806 C'], images: ['Black', 'PANTONE 806 C'],
+  plates: { inks: ['Black', 'PANTONE 806 C'], images: ['Black'],

#A fluorescent yellow instead

Change the ink and its screen colour; the plates, the finish and the curves follow the name.

-const PINK = { name: 'PANTONE 806 C', cmyk: { c: 0, m: 77, y: 0, k: 0 } };
+const PINK = { name: 'PANTONE 803 C', cmyk: { c: 0, m: 0, y: 92, k: 0 } };

Rename PANTONE 806 C in CURVES, PRINT and the palette's hexes the same way.

Pitfalls

  • A colour neither plate prints is projected onto the two inks. A process blue left in a style comes out as a dark pink-black; read the preflight's offPlateColor findings before sending the file.
  • A fluorescent ink has no faithful CMYK alternate. A proof or an RGB PDF shows the hex, which is duller than the ink on paper.

Credits

Text
Original prose, CC BY 4.0
Images
  • A crowd at a basement gig, on the cover · Generated With Diffusion Models · original
  • A guitarist on a small stage · Generated With Diffusion Models · original
  • An alley wall layered with posters · Generated With Diffusion Models · original
Fonts
Archivo Black (SIL OFL 1.1) · IBM Plex Sans (SIL OFL 1.1) · IBM Plex Mono (SIL OFL 1.1)
SandboxPDF