My use case is like this: I use a "symbol" font like fontawesome, where each letter/glyph is used as an icon, and is colorized in the Latex document using \textcolor. However, some symbols I need are not in fontawesome, so I need to supply them as vector art - that is, .pdf; and in that case, I'd like to colorize the thusly included PDF in the same way as the rest of the fontawesome glyphs.

Interestingly, for the vector graphics that I've tried it on, \color command actually changes all the black into whatever color was given.
This is supported by pdfTeX/LuaTeX only and only if the graphics does not contain color settings. This behavior can be overwritten by the option resetcolor for \includegrahics. Then pdftex.def calls \normalcolor before the image is included.

Easy case with uncolored PDF and pdfTeX (unhappily very seldom):
The PDF file contains some drawings without explicit color settings and the image will be included by the pdftex driver of the graphics package.

I was puzzled by this at first, but I think I finally came to an example on how to create such a PDF "without explicit color settings", which I'll post here - however, I'd like to know if there's a better/more generic approach that will allow me to "uncolorize" PDFs for inclusion with coloring in Latex (maybe by using imagemagick or something similar?).

Ok, so first, let's generate the vector image to be included using Latex - for simplicity, using picture environment (without Tikz); this is include1.tex:

After compiling with pdflatex testinclude.tex, I can confirm all is as expected - that is, the included PDF is colorized:

All good so far; now, I open include1.pdf in Inkscape, save it first as SVG include2.svg; then reopen the include2.svg in Inkscape, and Save As include2.pdf.

Now, if I change the "Testing here 2" line in testinclude.tex to Testing here 2: \textcolor{blue}{\includegraphics[height=1em]{include2.pdf}}, and recompile with pdflatex testinclude.tex, then I get this:

So, clearly the PDF exported from Inkscape is not uncolorized any more, and so Latex cannot colorize it blue, so it appears black.

We can inspect the include1.pdf and include2.pdf by uncompressing them with the pdftk program:

... where the rg should be the PDF operator that sets the RGB color; so 0 0 0 rg would set the color to RGB 0,0,0 - that is, black.

So, we can simply "erase" this RGB setting by replacing 0 0 0 rg (which is 8 characters long) with a string of spaces with same length (so we don't mess up the PDF XREF dictionary), either in a text editor like nano, or directly with sed:

sed -i 's/0 0 0 rg/ /' include2-unc.pdf

... then replace the "Testing here 2" line in testinclude.tex with Testing here 2: \textcolor{blue}{\includegraphics[height=1em]{include2-unc.pdf}}, and recompile with pdflatex testinclude.tex, -- and then we're back to a colorized PDF inclusion, as in the first image in this post.

So, my questions are:

Is there a tool that would help me automatically "uncolorize" PDFs that I want to include in this manner (so I don't have to uncompress PDFs and manually search for, and replace, PDF color operators)?

Is there a technique/package in Latex that would allow me to refer to colorized PDFs on disk, but will "uncolorize" them before they are included with \includegraphics?