简单来说
一本小小的音乐杂志,只用两种油墨印刷:黑色和一种鲜艳的霓虹粉。照片印成黑色和粉色,粉色在3D视图里发亮,印刷文件正好只有两块印版。
成品一览
虚构的音乐小志《Pink Noise》第7期:八页A5,骑马钉装订,在一台有两个滚筒的机器上印刷。一个滚筒印黑色,另一个印荧光粉红,除此之外没有任何东西印到纸上。粉红用于封面标题、访谈开篇页的色带、问题、引文和封底;它的30 %网点色调填满演出预告的框。三张照片是灰度原图,印成双色调:暗部是黑色,中间调是粉红。Folio把这本小志摊开放在一张深色桌子上,粉红在纸面上格外醒目。
这道食谱解答
- 怎样只用黑色和荧光粉红印一本小志,并把照片印成双色调?
简短回答
// 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 } };
用料
- 功能
- 特种油墨专色与油墨表CMYK与灰度PDF3D书本查看器(Folio)纸张、装订、台面与光照(Folio)语义调色板封面、扉页和版权页标题样式设计过的章首页页面设计中的文字、线条和框页面设计中的图片标注框作为资源的图和表导出PDF在Canvas上绘制页面
- 类型
- Archivo Black, IBM Plex Sans, IBM Plex Mono(SIL OFL 1.1)
- 素材
crowd-900.jpgguitarist-600.jpgposters-560.jpg- A crowd at a basement gig, on the cover (Generated With Diffusion Models, 原创)
- A guitarist on a small stage (Generated With Diffusion Models, 原创)
- An alley wall layered with posters (Generated With Diffusion Models, 原创)
做法
#1 · 两块印版,粉红是荧光色
代码就是上面的简短回答。print.plates列出这项活儿要印的印版,Black和PANTONE 806 C,PDF里就只有这两个分色版,别无其他(双色印刷)。粉红是专色;它的工艺写在油墨表里,就像写在给印刷厂的订单上一样,这让它成为荧光油墨:它有自己的印版,Folio把它照得比纸还亮(工艺)。images把照片放到两块印版上,CURVES分别决定每一块的形状:黑色只在暗部,粉红在中间调,到暗部逐渐减弱,这样粉红永远不会把黑色弄脏。
#2 · 屏幕上也显示双色调
// 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());
}
画布和Folio按图片文件本来的样子绘制,所以灰度照片在那里会显示为灰色,尽管它印出来是粉红和黑色。本食谱为屏幕另外登记一张图片:同样的灰度经过同样的CURVES读取,黑色以正片叠底的方式叠在粉红上,就像油墨在纸上叠在一起那样。PDF仍从imageBytes拿到灰度原图,由它自己分色。
#3 · 黑色叠在粉红上
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) })),
] } } };
黑色只占K版,设成带overprint: true的CMYK颜色。黑色文字或封面的黑色色带碰到粉红的地方,黑色叠印在上面,而不是把粉红镂空,所以即使某一张纸套准稍有偏差,也不会露出白边。粉红标题则在黑色上镂空,深色色带上的文字本该如此。
#4 · 深色桌面上的Folio
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 },
};
荧光油墨周围要有一点暗,才看得出是荧光。小志摊开在访谈那一页,放在一块平整的深色台面上,照着阴天平淡的光,粉红色带和照片里的粉红在白纸上格外醒目。
完整食谱
// ═══ 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
组合好的script.js可以直接运行:把它粘贴到任何页面的模块脚本中,或在CodePen上打开这道食谱。 GitHub上的食谱文件夹 ↗ (在新标签页中打开)
变化
#照片只用黑色印
图片只用一块印版时,照片在黑版上印成普通的灰度,粉红留给文字和框。
- plates: { inks: ['Black', 'PANTONE 806 C'], images: ['Black', 'PANTONE 806 C'],
+ plates: { inks: ['Black', 'PANTONE 806 C'], images: ['Black'],#换成荧光黄
改掉油墨和它的屏幕颜色;印版、工艺和曲线都随名称而变。
-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 } };同样在CURVES、PRINT和调色板的hex里把PANTONE 806 C改名。
常见问题
- 两块印版都不印的颜色会被投影到这两种油墨上。样式里遗留的一个四色蓝会印成发黑的粉红;发送文件前先看印前检查给出的
offPlateColor结果。 - 荧光油墨没有忠实的CMYK替代色。打样或RGB的PDF显示的是hex,比纸上的油墨暗淡。
致谢
- 文本
- 原创文字, CC BY 4.0
- 图片
- A crowd at a basement gig, on the cover · Generated With Diffusion Models · 原创
- A guitarist on a small stage · Generated With Diffusion Models · 原创
- An alley wall layered with posters · Generated With Diffusion Models · 原创
- 字体
- Archivo Black (SIL OFL 1.1) · IBM Plex Sans (SIL OFL 1.1) · IBM Plex Mono (SIL OFL 1.1)


