Debian Codegraph @

texmf-dist/doc/latex/spotxcolor/spotxcolor.tex

raw
1 %#!lualatex -synctex=1 spotxcolor
2 \documentclass[luatex]{article}\listfiles
3 \usepackage{shortvrb}\AtBeginDocument{\MakeShortVerb{\|}}
4 \usepackage{needspace}
5 \usepackage{hyperref}
6 \usepackage[table]{xcolor}
7
8 % For Examples
9 \usepackage{tikz}
10 \usetikzlibrary{patterns.meta}
11 \usepackage{tcolorbox}
12 \tcbuselibrary{skins}
13
14 \usepackage{spotxcolor}
15
16 % Define Triadic Spot Colors for Examples
17 \definespotcolor{DIC161s}{DIC 161s*}{0, 0.64, 1, 0} % Vermilion
18 \definespotcolor{DIC256s}{DIC 256s*}{0.9, 0, 0.4, 0} % Green
19 \definespotcolor{DIC200s}{DIC 200s*}{0.5, 0.8, 0, 0} % Purple
20
21 % PANTONE Metallic Coated (true spot color — Lab→CMYK via ML model)
22 \definespotcolor{PANTONE876C}{PANTONE 876 C}{0.4467, 0.7463, 0.9732, 0.0}
23
24 \makeatletter\let\hangingbox\@hangfrom\makeatother
25 \newcommand\pkg[1]{\textsf{#1}}
26 \newcommand\cs[1]{\texttt{\textbackslash #1}}
27 \newcommand\op[1]{\texttt{#1}}
28
29 \title{\textsf{spotxcolor} Package}
30 \author{Munehiro Yamamoto}
31 \date{2026/03/29 v1.7}
32
33 \begin{document}
34 \maketitle
35
36 \begin{abstract}
37 This package provides robust spot color (e.g., DIC, PANTONE) support for the \textsf{xcolor} package across all major \TeX\ engines.
38 It resolves structural PDF issues found in legacy packages and provides explicit fallback mechanisms for various drivers.
39 \end{abstract}
40
41 \section{Motivation \& Features}
42 While the legacy \textsf{spotcolor} package has been used for years, it suffers from structural PDF compatibility issues with modern \textsf{expl3} and \textsf{xcolor} updates.
43 The \textsf{colorspace} package is an excellent modern alternative, but it lacks full support for the \texttt{dvipdfmx} driver.
44 To address these gaps, the \textsf{spotxcolor} package natively hooks into the \textsf{xcolor} package to provide a universal, print-safe solution.
45 Its core features include:
46
47 \begin{itemize}
48 \item \textbf{Native \textsf{xcolor} Integration:} Use spot colors exactly like standard colors (e.g., |\textcolor|, |\pagecolor|), generating perfect PDF structures for \texttt{pdftex} and \texttt{luatex}.
49 \item \textbf{Universal Engine Support \& Safe Fallbacks:} Ensures safe CMYK fallback for \texttt{dvipdfmx} and \texttt{xetex} when using standard macros, while providing explicit injection commands (|\SpotColor|) for true spot color output in \texttt{dvipdfmx}.
50 \item \textbf{Advanced Graphics (\textsf{TikZ}/\textsf{PGF}) Support:} Internally patches \textsf{PGF} driver macros and pattern primitives to emit true spot color PDF operators.
51 It supports fill/stroke separation, fadings, blend modes, and uncolored patterns (\texttt{patterns} and \texttt{patterns.meta}).
52 Spot color tints are auto-detected from CMYK values throughout the entire PGF rendering pipeline.
53 \item \textbf{Seamless Decorations:} Works flawlessly with \textsf{colortbl} (zebra-striped tables) and \textsf{tcolorbox} (frames, backgrounds, shadows).
54 \item \textbf{Complete Backward Compatibility:} Perfectly emulates user commands from both \textsf{spotcolor} and \textsf{colorspace} packages.
55 \end{itemize}
56
57 \section{Requirements}
58 This package requires a modern \TeX\ Live environment (with an up-to-date \textsf{expl3}/\textsf{l3kernel}), alongside the \textsf{xcolor} and \textsf{iftex} packages.
59
60 \section{Loading the \textsf{spotxcolor} Package}
61
62 Load the \textsf{spotxcolor} package in your preamble. It automatically detects your engine via the \textsf{iftex} package.
63
64 \begin{quote}
65 \begin{verbatim}
66 \usepackage{spotxcolor}
67 \end{verbatim}
68 \end{quote}
69
70 \section{Usage}
71
72 \subsection{Defining and Using Spot Colors}
73 Use |\definespotcolor| to register a spot color.
74 The arguments are: \LaTeX\ name, PDF name, and CMYK values.
75 Once registered, you can use standard \textsf{xcolor} commands:
76
77 \begin{quote}
78 \begin{verbatim}
79 \definespotcolor{DIC161s}{DIC 161s*}{0, 0.64, 1, 0}
80
81 \textcolor{DIC161s}{This text is DIC 161.}
82 \end{verbatim}
83 \end{quote}
84
85 \noindent PANTONE colors work the same way.
86
87 \begin{quote}
88 \begin{verbatim}
89 % PANTONE Metallic Coated (true spot color)
90 \definespotcolor{PANTONE876C}{PANTONE 876 C}{0.4467, 0.7463, 0.9732, 0}
91
92 \textcolor{PANTONE876C}{This text is PANTONE 876 C (Metallic Gold).}
93 \textcolor{PANTONE876C!50}{50% tint of PANTONE 876 C.}
94 \end{verbatim}
95 \end{quote}
96
97 \noindent The PDF Separation array will contain |/PANTONE#20876#20C|, matching the encoding produced by Adobe Illustrator.
98
99 \vspace{0.5em}
100 \noindent Live example:
101 \textcolor{PANTONE876C}{\textbf{PANTONE 876 C (100\%)}} \quad
102 \textcolor{PANTONE876C!50}{\textbf{50\%}} \quad
103 \textcolor{PANTONE876C!25}{\textbf{25\%}}
104
105 \subsection{Dvipdfmx Explicit Spot Colors}
106 All standard macros (|\color|, |\textcolor|, |\pagecolor|) produce true spot color output on \texttt{dvipdfmx}/\texttt{xetex} as well, via automatic \verb|\special{pdf:code}| injection.
107
108 The |\SpotColor| command remains available as a lightweight, low-level alternative for direct PDF literal injection:
109
110 \begin{quote}
111 \begin{verbatim}
112 \SpotColor{DIC161s}{1.0}
113 This text is 100\% DIC 161.
114
115 \SpotColor{DIC161s}{0.5}
116 This text is 50\% DIC 161.
117 \end{verbatim}
118 \end{quote}
119
120 \subsection{Note for \texttt{(u)p\LaTeX} Users}
121 If you compile your document with \texttt{platex} or \texttt{uplatex} and generate a PDF via \texttt{dvipdfmx}, you \textbf{must} specify the \texttt{dvipdfmx} driver option globally in your document class:
122
123 \begin{quote}
124 \begin{verbatim}
125 \documentclass[dvipdfmx]{article}
126 \end{verbatim}
127 \end{quote}
128
129 Without this option, modern \textsf{expl3} and \textsf{xcolor} will default to the \texttt{dvips} driver, and the PDF objects for spot colors will not be generated correctly.
130
131
132 \section{Examples in Advanced Graphics}
133
134 The true power of the \textsf{spotxcolor} package lies in its flawless integration with modern graphics libraries.
135 For the following examples, we have defined three spot colors forming a triadic color harmony: \textcolor{DIC161s}{\textbf{DIC161s}} (Vermilion), \textcolor{DIC256s}{\textbf{DIC256s}} (Green), and \textcolor{DIC200s}{\textbf{DIC200s}} (Purple).
136
137 \subsection{TikZ: Patterns and Multiply Blend Mode}
138
139 \textsf{spotxcolor} safely forces PGF's hardcoded RGB patterns into the CMYK color space to ensure print safety. It also flawlessly handles PDF blend modes (e.g., multiply) with spot colors.
140
141 \vspace{1em}
142 \begin{center}
143 \begin{tikzpicture}
144 % 1. Patterns
145 \draw[DIC161s, ultra thick, pattern={Lines[angle=45, distance=6pt, line width=1.5pt]}, pattern color=DIC161s!60]
146 (0,0) rectangle (3, 3)
147 node[pos=0.5, fill=white, inner sep=2pt, font=\sffamily\small, text=DIC161s] {Meta Lines (60\%)};
148
149 % 2. Multiply Blend Mode with Triadic Colors
150 \begin{scope}[xshift=6cm, yshift=1.5cm, blend mode=multiply]
151 \fill[DIC161s] (90:0.8) circle (1.2);
152 \fill[DIC256s] (210:0.8) circle (1.2);
153 \fill[DIC200s] (330:0.8) circle (1.2);
154 \end{scope}
155 \end{tikzpicture}
156 \end{center}
157 \vspace{1em}
158
159 \subsection{tcolorbox Integration}
160
161 Spot colors and their tints (e.g., \texttt{DIC200s!10}) can be used directly within complex \textsf{tcolorbox} environments, including frames, backgrounds, and drop shadows.
162
163 \vspace{1em}
164 \begin{tcolorbox}[
165 enhanced,
166 colframe=DIC200s, % Frame color
167 colback=DIC200s!5, % Background color (5% tint)
168 coltitle=white, % Title text color
169 colbacktitle=DIC200s!80, % Title background color (80% tint)
170 fonttitle=\sffamily\bfseries,
171 title={Triadic Harmony with \textsf{tcolorbox}},
172 drop fuzzy shadow=DIC200s!30 % Shadow color (30% tint)
173 ]
174 This box is styled entirely using \textbf{DIC 200s} and its tints.
175 The frame is 100\% spot color, the title background is 80\%, the content background is 5\%, and even the drop shadow is rendered safely using a 30\% tint.
176
177 \vspace{0.5em}
178 \noindent You can also mix text colors easily: \textcolor{DIC161s}{\textbf{Vermilion Text}} and \textcolor{DIC256s}{\textbf{Green Text}}.
179 \end{tcolorbox}
180
181
182 \section{Spot Color Dictionaries and Tools}
183
184 \subsection{Included Dictionary (\texttt{dic.def})}
185 For your convenience, the package includes \texttt{dic.def} in the \texttt{doc} directory, which contains definitions for the widely used DIC Color Guide in Japanese commercial printing.
186 The CMYK values in this file are natively extracted from Adobe's official legacy definitions (\texttt{.acbl}), ensuring absolute print-accurate fallback values.
187
188 \begin{tcolorbox}[
189 enhanced,
190 colframe=DIC161s!90!black,
191 colback=DIC161s!5,
192 coltitle=white,
193 colbacktitle=DIC161s,
194 fonttitle=\sffamily\bfseries\large,
195 title={\raisebox{-0.2ex}{\Huge \textbf{!}}\quad IMPORTANT WARNING},
196 drop fuzzy shadow=DIC161s!30,
197 attach boxed title to top left={xshift=10pt, yshift=-10pt},
198 boxed title style={rounded corners, sharp corners=southwest}
199 ]
200 Please do \textbf{not} load the entire \texttt{dic.def} file (or any other large dictionary) into your preamble using \verb|\input|.
201
202 Calling \verb|\definespotcolor| immediately generates PDF objects (ColorSpace dictionaries and Tint Transform Functions) to guarantee strict PDF specification compliance and robustness across all rendering engines.
203
204 Loading thousands of unused spot colors will bloat your PDF with unnecessary objects and resource aliases, which may cause PDF viewers (including Adobe Acrobat) to freeze or fail to render the document.
205
206 Instead, open \texttt{dic.def} in a text editor, copy \textbf{only} the specific \verb|\definespotcolor| lines you actually need, and paste them into your document preamble.
207 \end{tcolorbox}
208
209 \subsection{Extraction Tools}
210 If you need spot colors from other color books (e.g., PANTONE, TOYO, HKS), you can extract them from Adobe Illustrator's color book files using the provided Ruby scripts located in the \texttt{doc} directory:
211
212 \begin{itemize}
213 \item \textbf{\texttt{acbl2def.rb}}: Extracts native, perfect CMYK values from Adobe Color Book Legacy (\texttt{.acbl}) XML files. \emph{(Highly Recommended)}
214 \item \textbf{\texttt{ase2def.rb}}: Extracts CMYK values from Adobe Swatch Exchange (\texttt{.ase}) files exported directly from Illustrator.
215 \item \textbf{\texttt{acb2def.rb}}: Parses modern binary Adobe Color Book (\texttt{.acb}) files. Note that many \texttt{.acb} files store colors in the Lab color space. This script applies a 3rd-Degree Polynomial Regression Model (trained on native Adobe data) to predict highly accurate CMYK fallback values while minimizing K-channel muddiness. While extremely close to native values, it remains an approximation. For exact manufacturer values, use \texttt{acbl2def.rb} or \texttt{ase2def.rb}.
216 \end{itemize}
217
218 \subsection{A Note on PANTONE Color Families}
219
220 Not all PANTONE color books produce true spot colors in PDF.
221 When using \texttt{acb2def.rb} to generate PANTONE definitions, be aware of the distinction:
222
223 \begin{description}
224 \item[PANTONE Metallic Coated, PANTONE Solid Coated/Uncoated, etc.]
225 These represent actual spot inks that require a dedicated printing plate.
226 Adobe Illustrator creates a \texttt{/Separation} color space for these colors, and they appear as true spot colors in the output preview.
227 \texttt{acb2def.rb} converts their Lab values to CMYK via the built-in ML model to produce accurate fallback colors for on-screen display.
228
229 \item[PANTONE+ CMYK Coated / PANTONE+ CMYK Uncoated]
230 These are \emph{process color} formulations---CMYK recipes designed to approximate PANTONE colors using only the four standard process inks.
231 Adobe Illustrator writes them as plain CMYK operators (e.g., |1 0.94 0 0.5 k|) without creating \texttt{/Separation} entries.
232 While \texttt{acb2def.rb} can generate \texttt{.def} files for these families, the resulting colors will function as process colors in practice.
233 \end{description}
234
235 \section{Backward Compatibility}
236
237 \textsf{spotxcolor} allows you to safely reuse legacy code and dictionaries written for both the \textsf{spotcolor} and \textsf{colorspace} packages without raising errors.
238
239 \subsection{Wrapper for \textsf{spotcolor}}
240 The legacy \textsf{spotcolor} package defined colors using a three-step process.
241 \textsf{spotxcolor} seamlessly maps these to its modern implementation:
242
243 \begin{quote}
244 \begin{verbatim}
245 % Legacy syntax:
246 \NewSpotColorSpace{DIC}
247 \AddSpotColor{DIC}{DIC161s}{DIC\SpotSpace 161s*}{0 0.64 1 0}
248 \SetPageColorSpace{DIC}
249
250 % spotxcolor interpretation:
251 % The \AddSpotColor macro safely acts as a wrapper for:
252 % \definespotcolor{DIC161s}{DIC 161s*}{0, 0.64, 1, 0}
253 \end{verbatim}
254 \end{quote}
255 Note that |\NewSpotColorSpace|
256 and |\SetPageColorSpace| are now defined as dummy macros. In modern environments, \textsf{spotxcolor} globally and safely manages PDF resource dictionaries.
257
258 \subsection{Wrapper for \textsf{colorspace}}
259 The \textsf{colorspace} package required authors to manually manipulate page resource dictionaries using specific commands:
260
261 \begin{itemize}
262 \item |\pagecolorspace{<name>}|
263 \item |\resetpagecolorspace|
264 \end{itemize}
265
266 \textsf{spotxcolor} defines both of these as \textbf{empty dummy macros} (they do nothing).
267 Why?
268 Because \textsf{spotxcolor} utilizes robust, modern techniques (like hooking into PGF's resource management API) to inject color spaces globally and safely.
269 Attempting to manually manipulate the \texttt{/ColorSpace} dictionary on a per-page basis is dangerous in modern \LaTeX\ and can easily corrupt the PDF structure.
270 By neutralizing these legacy commands, \textsf{spotxcolor} guarantees that older documents will compile perfectly and safely without any structural PDF errors.
271
272
273 \section{Compatibility with pdfmanagement (l3pdf)}
274
275 \subsection{Background}
276
277 Modern \LaTeX\ (since 2020) provides an optional PDF resource management layer called \emph{pdfmanagement},
278 activated by placing |\DocumentMetadata{}| before |\documentclass|.
279 When pdfmanagement is active, it takes exclusive control of all PDF page resources---including the \texttt{/ColorSpace} dictionary---and direct access via |\pdfpageresources| or |\special{pdf:put}| is forbidden.
280
281 Furthermore, pdfmanagement redefines PGF's |\pgfutil@addpdfresource@colorspaces| with its own parser (|\__pdfmanagement_patch_pgfcolorspaces:w|), which expects a different argument format.
282 Passing the raw object references that \textsf{spotxcolor} produces (e.g., |42 0 R|) through this rewritten macro causes a ``Runaway argument'' error.
283
284 \subsection{Automatic Detection and Dispatch}
285
286 \textsf{spotxcolor} detects pdfmanagement at load time using |\IfPDFManagementActiveTF| and automatically switches its resource registration strategy:
287
288 \begin{center}
289 \renewcommand{\arraystretch}{1.3}
290 \begin{tabular}{ll}
291 \hline
292 \textbf{Mode} & \textbf{Resource Registration} \\
293 \hline
294 Traditional (no pdfmanagement) & |\pgfutil@addpdfresource@colorspaces| \\
295 & or |\pdfpageresources| / |\special{pdf:put}| \\
296 \hline
297 pdfmanagement active & |\pdfmanagement_add:nne| \\
298 & |{Page/Resources/ColorSpace}| \\
299 \hline
300 \end{tabular}
301 \end{center}
302
303 \noindent This switch is transparent to the user.
304 All existing |\definespotcolor|, |\color|, |\textcolor|, |\pagecolor|, and \textsf{TikZ} commands work identically in both modes.
305
306 \subsection{Usage}
307
308 To use \textsf{spotxcolor} with pdfmanagement, simply add |\DocumentMetadata{}| as the very first line of your document:
309
310 \begin{quote}
311 \begin{verbatim}
312 \DocumentMetadata{} % activates pdfmanagement
313 \documentclass{article}
314 \usepackage{spotxcolor}
315 \definespotcolor{DIC161s}{DIC 161s*}{0, 0.64, 1, 0}
316 \begin{document}
317 \textcolor{DIC161s}{Spot color text}
318 \end{document}
319 \end{verbatim}
320 \end{quote}
321
322 \noindent No additional options or workarounds are required.
323
324
325 \section{Limitations}
326
327 The \textsf{spotxcolor} package auto-detects spot colors by checking whether CMYK values in the PDF output are a \emph{proportional scalar multiple} of a registered spot color's base CMYK values.
328 This approach covers the vast majority of practical use cases, but has inherent limitations in the following areas.
329 % %TODO:% For a detailed technical explanation of the interception architecture and why these limitations exist, see the companion document \texttt{spotxcolor-technote.pdf}.
330
331 \subsection{Non-Proportional Color Mixes}
332
333 When a spot color is mixed with another color model using \textsf{xcolor}'s |!| operator, the resulting CMYK values may no longer be a simple scalar multiple of the base.
334 In such cases, the output correctly falls back to CMYK representation.
335
336 \begin{quote}
337 \begin{verbatim}
338 % Proportional tint — auto-detected as spot color (tint=0.5)
339 \textcolor{DIC161s!50}{50% tint}
340 % Base CMYK: (0, 0.64, 1, 0)
341 % Computed: (0, 0.32, 0.5, 0) ← scalar multiple (×0.5) ✓
342
343 % Non-proportional mix — falls back to CMYK
344 \textcolor{DIC161s!80!black}{80% DIC161s mixed with black}
345 % Computed: (0, 0.512, 0.8, 0.2) ← K≠0 breaks proportionality ✗
346
347 % Another non-proportional mix
348 \textcolor{DIC161s!50!DIC256s}{50% DIC161s mixed with DIC256s}
349 % Computed: (0.45, 0.32, 0.7, 0) ← no single spot color match ✗
350 \end{verbatim}
351 \end{quote}
352
353 True representation of such mixes would require \texttt{/DeviceN} color spaces (e.g., \texttt{[/DeviceN [/DIC\string~161s* /Black] ...]}\,), which is beyond the scope of this package.
354
355 \subsection{Shading (Gradients)}
356
357 PGF's |\shade| command generates Shading dictionary objects (PDF Type~2 and Type~3 shadings) with a hardcoded \texttt{/DeviceRGB} color space.
358 The color values are resolved and frozen into RGB at the time the shading object is created, before any content stream operators are emitted.
359
360 This contrasts with \emph{patterns} (hatching), where the color is specified by operators in the content stream (|/pgfpspot_DIC161s cs 0.6 /pgfpat21 scn|) and can be intercepted.
361 For shadings, the content stream contains only |/Fm16 Do| (``paint this Form~XObject'')---no color information to intercept.
362
363 \begin{quote}
364 \begin{verbatim}
365 % Both endpoints are converted to RGB inside the Shading object.
366 % The PDF will contain:
367 % /ColorSpace /DeviceRGB
368 % /Function << /C0 [r g b] /C1 [r g b] ... >>
369 \shade[left color=DIC161s, right color=DIC161s!10]
370 (0,0) rectangle (4, 1.5);
371 \end{verbatim}
372 \end{quote}
373
374 Since spotxcolor's interception operates at the content stream operator level, it cannot modify these pre-built PDF objects.
375 True spot color gradients would require generating Shading objects with \texttt{/ColorSpace [/Separation~...]} and tint-value function endpoints, which amounts to rewriting PGF's shading generation code entirely.
376 % %TODO:% See the Technical Note (\texttt{spotxcolor-technote.pdf}, Section~X.Y) for a detailed structural comparison.
377
378 \needspace{2\baselineskip}
379 \subsection{Summary}
380
381 \begin{center}
382 \renewcommand{\arraystretch}{1.3}
383 \begin{tabular}{ll>{\raggedright\arraybackslash}m{11em}}
384 \hline
385 \textbf{Feature} & \textbf{Status} & \textbf{Notes} \\
386 \hline
387 |\color|, |\textcolor| & \textcolor{DIC256s}{\textbf{Spot}} & All engines \\
388 |\pagecolor| & \textcolor{DIC256s}{\textbf{Spot}} & All engines \\
389 |\SpotColor| & \textcolor{DIC256s}{\textbf{Spot}} & Direct PDF literal \\
390 TikZ fill/stroke & \textcolor{DIC256s}{\textbf{Spot}} & Via PGF driver patch \\
391 Low-level PGF commands & \textcolor{DIC256s}{\textbf{Spot}} & Via PGF driver patch \\
392 Uncolored patterns & \textcolor{DIC256s}{\textbf{Spot}} & Via \texttt{[/Pattern\space [/Separation~...]]} \\
393 Fading / transparency & \textcolor{DIC256s}{\textbf{Spot}} & Fill color is spot \\
394 Opacity + blend modes & \textcolor{DIC256s}{\textbf{Spot}} & Fill color is spot \\
395 \textsf{colortbl} row colors & \textcolor{DIC256s}{\textbf{Spot}} & Via |\set@color| patch \\
396 \textsf{tcolorbox} & \textcolor{DIC256s}{\textbf{Spot}} & Frame, background, shadow \\
397 \hline
398 Proportional tints (\texttt{!N}) & \textcolor{DIC256s}{\textbf{Spot}} & Auto-detected \\
399 Non-proportional mixes (\texttt{!N!color}) & \textbf{CMYK} & Needs \texttt{/DeviceN} \\
400 Shading (gradients) & \textbf{RGB} & PGF hardcodes \texttt{/DeviceRGB} \\
401 \hline
402 \end{tabular}
403 \end{center}
404
405
406 \section{Comparison with Other Spot Color Packages}
407
408 Several \LaTeX\ packages provide spot color support.
409 This section compares them to help you choose the right tool for your workflow.
410
411 \subsection{Package Overview}
412
413 \begin{description}
414 \item[\textsf{spotcolor} (2006)]
415 The original spot color package, designed exclusively for pdf\LaTeX.
416 It defines a custom \textsf{xcolor} color model (|spotcolor|) and provides the |\SpotColor| command for direct PDF literal injection via |\pdfliteral|.
417 However, |\SpotColor| does not use the color stack, so spot color output does not survive page breaks.
418 It only supports \texttt{pdftex} (no \texttt{luatex}, \texttt{dvipdfmx}, or \texttt{xetex} support) and has no PGF/TikZ integration.
419
420 \item[\textsf{xespotcolor} (2014--2021)]
421 A spot color package for Xe\LaTeX\ and \texttt{dvipdfmx}.
422 It provides basic PGF integration by defining custom PGF driver macros (|\pgfsys@color@spotcolor@fill|, etc.), but these only work when the user explicitly calls a spot color command---standard \textsf{xcolor} commands still produce CMYK.
423 It does not support \texttt{pdftex} or \texttt{luatex}.
424
425 \item[\textsf{colorspace} (2015--2019)]
426 A modern package supporting Separation and DeviceN color spaces.
427 It hooks into \textsf{xcolor}'s internal color representation and provides PGF fill/stroke driver macros.
428 It supports \texttt{pdftex} and \texttt{luatex}, but \textbf{not} \texttt{dvipdfmx} or Xe\LaTeX.
429 It requires manual page resource management (|\pagecolorspace|, |\resetpagecolorspace|).
430
431 \item[\textsf{spotxcolor} (2026)]
432 This package.
433 It intercepts all color output paths---\textsf{xcolor}'s |\set@color|, PGF driver macros, and PGF pattern primitives---to transparently convert proportional spot color tints from CMYK to Separation operators.
434 It supports all four major engines and requires no special commands beyond standard \textsf{xcolor} usage.
435 \end{description}
436
437 \subsection{Feature Comparison}
438
439 \begin{center}
440 \renewcommand{\arraystretch}{1.3}
441 \small
442 \begin{tabular}{lcccc}
443 \hline
444 \textbf{Feature}
445 & \textsf{spotcolor}
446 & \textsf{xespotcolor}
447 & \textsf{colorspace}
448 & \textsf{spotxcolor} \\
449 \hline
450 pdftex & Yes & --- & Yes & Yes \\
451 luatex & --- & --- & Yes & Yes \\
452 xetex & --- & Yes & --- & Yes \\
453 dvipdfmx & --- & Yes & --- & Yes \\
454 \hline
455 |\color|, |\textcolor| as spot
456 & --- & --- & Yes & Yes \\
457 |\pagecolor| as spot
458 & --- & --- & --- & Yes \\
459 Color stack (page breaks)
460 & --- & --- & Yes & Yes \\
461 Tinted expressions (|!50|)
462 & --- & --- & Yes & Yes \\
463 \hline
464 PGF fill/stroke & --- & Yes$^\dagger$ & Yes & Yes \\
465 PGF pattern fills as spot
466 & --- & --- & --- & Yes \\
467 \textsf{colortbl} as spot
468 & --- & --- & Yes$^\ddagger$ & Yes \\
469 \textsf{tcolorbox} as spot
470 & --- & --- & Yes$^\ddagger$ & Yes \\
471 \hline
472 DeviceN & --- & --- & Yes & --- \\
473 \hline
474 \multicolumn{5}{@{}p{\linewidth}@{}}{\hangingbox{$^\dagger$:\space}%
475 \textsf{xespotcolor} defines custom PGF driver macros, but they are only activated when the user explicitly calls spot color commands, not through standard \textsf{xcolor} usage.
476 }\\
477 \multicolumn{5}{@{}p{\linewidth}@{}}{\hangingbox{$^\ddagger$:\space}%
478 \textsf{colorspace} supports these through its \textsf{xcolor} integration, but only on \texttt{pdftex} and \texttt{luatex}.
479 }
480 \end{tabular}
481 \end{center}
482
483 \end{document}