It is indicated in the pdfx manual
To produce a validating PDF/X document,pdfx overrides internal macros while keeping colors associated with link anchors.
I can see the same claim in the answer here: pdfx - package leads to non-working hyperref links
But my minimal example (Luatex 2018) shows that any link is printed only in the surrounding colors.
\documentclass{article}
\usepackage[x-4]{pdfx} %option x-4 for print, a-1b for archive (also display)
%\usepackage{hyperref}, it is already included by pdfx
\hypersetup{ colorlinks, allcolors=blue}%
\begin{document}
\section{First}\label{first_section}
Check \ref{second_section} (it should be in {\color{blue}blue}).\\{\color{blue} Check \ref{second_section} (it just follows the surrounding color)}.
\section{Second}\label{second_section}
\end{document}
If I change
\usepackage[x-4]{pdfx}
to
\usepackage[a-1b]{pdfx}
the blue link color (in the first line) appears again.
I have also used a CMYK color instead of blue, but no success:
\definecolor{amGrayCMYK}{cmyk}{0.45,0.34,0.34,0}
Any idea how to keep hyperref link colors (not the functionality) in PDF/X output?