On submitting a paper to arXiv I got an error “cannot convert to PDF” with no apparent reason. The minimum non-working example is as main.tex:

\documentclass[a4paper]{article}
\usepackage{xcolor}
\definecolor[named]{customColor}{rgb}{0.31,0.31,0.33}

\begin{document}
\textcolor{customColor}
Hello world
\end{document}

Compiling it with latexmk -ps main.tex yields the following error.

Running 'ps2pdf -dALLOWPSTRANSPARENCY  "main.ps" "main.pdf"'
------------
Error: /undefined in XC@customColor
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1990   1   3   %oparray_pop   1989   1   3   %oparray_pop   1977   1   3   %oparray_pop   1833   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:784/1123(ro)(G)--   --dict:0/20(G)--   --dict:102/200(L)--   --dict:177/300(L)--
Current allocation mode is local
Current file position is 41838
GPL Ghostscript 9.55.0: Unrecoverable error, exit code 1
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  ps2pdf: Command for 'ps2pdf' gave return code 256
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.

The problem seems to be on creation of the postscript file as it does not contain the named color customColor as mentioned in an answer to a post on stackexchange ↗. The normal workaround is to use different tooling, so latexmk -pdf main.tex works. For arXiv, we can add \pdfoutput=1 to one of the first 5 lines of the file to force the compilation to produce pdf straight away which does not use the problematic conversion as mentioned in the arXiv documentaiton ↗.