# Device Independent color

I am validating the following latex document with The 3-Heights™ PDF Validator Online Tool

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[rgb]{xcolor}

\begin{document}
\textcolor{blue}{This is only a test}
\end{document}


The output gives the error:

A device-specific color space (DeviceRGB) without an appropriate output intent is used.

How can I use colors that aren't device specific? Or use the appropriate intent?

-
The xcolor package lets you chose the color model, including device independent one. –  mafp Jan 29 at 1:07
@mafp I reviewed the documentation provided, which did mention driver-independent access to colors. Which color model is device independent(gray, rgb, HTML, etc.)? –  Ryan Gates Jan 29 at 1:25
I think it is already best explained here: tex.stackexchange.com/a/9973/21591. –  mafp Jan 29 at 9:18
@mafp I agree that it has been explained there and in the pdf documentation. I was unable to find a working example that I could use for this scenario. –  Ryan Gates Jan 30 at 1:17

Generating PDFA-1b compatible PDFs is rather difficult with LaTeX. The details are described here: http://support.river-valley.com/wiki/index.php?title=Generating_PDF/A_compliant_PDFs_from_pdftex

If it is just about the color profile, you may use the following piece of code:

\pdfminorversion=4
\documentclass{minimal}
\usepackage[rgb]{xcolor}

\immediate\pdfobj stream attr{/N 3}  file{sRGBIEC1966-2.1.icm}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (sRGB IEC61966-2.1)
/Info(sRGB IEC61966-2.1)
>> ]
}

\begin{document}
\textcolor{blue}{This is only a test}
\end{document}


The file sRGBIEC1966-2.1.icm is the color profile you want to use. Please put this file into the same directory your tex document is, so it can be found by pdftex. If you want to make your PDF even more PDFA-1b compliant, you may want to have a look at the pdfx package which has an option for PDFA-1b, too.

http://ctan.org/tex-archive/macros/latex/contrib/pdfx/

Please note that PDFs generated by pdftex are not PDFA compatible due to wrong EOL markers.

Update: I just added a complete example that works just fine for me. Please note that I use PDF version 1.4 to prevent compressed streams.

I tried adding the above code between the \usepackage and \begin, but then I got the error referred to in tex.stackexchange.com/q/71224/17290 –  Ryan Gates Feb 24 at 21:33
Ok, the answer seems to be: you google for your color profile and OutputConditionIdentifier. –  Christian Feb 24 at 22:40