[Tex/LaTex] ny recolor feature for imported images in LaTeX

color

Is there any feature in LaTeX to recolor a figure which is included in a LaTeX .tex file automatically like the feature which exists in programs like Word? It is a good feature, for instance the person has to bring different logos in his presentation slides and each are in different colors, by this feature he will be able to automatically recolor the logos to suite his presentation theme.

Before Recolor
enter image description here

After Recolor
enter image description here

Best Answer

Here is a possible solution for simple cases using blend mode (logo.png is your first B&W logo):

enter image description here

enter image description here

enter image description here

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
  \node{\includegraphics{logo}};
\end{tikzpicture}

\begin{tikzpicture}
  \begin{scope}[blend group=lighten];
    \begin{scope}[blend group=difference]
      \node[inner sep=0,line width=0] (logo) {\includegraphics{logo}};
      \fill[black] (logo.south west) rectangle (logo.north east);
    \end{scope}
    \fill[orange] (logo.south west) rectangle (logo.north east);
  \end{scope}
\end{tikzpicture}
\begin{tikzpicture}
  \begin{scope}[blend group=lighten];
    \begin{scope}[blend group=difference]
      \node[inner sep=0,line width=0] (logo) {\includegraphics{logo}};
      \fill[black] (logo.south west) rectangle (logo.north east);
    \end{scope}
    \fill[blue!70] (logo.south west) rectangle (logo.north east);
  \end{scope}
\end{tikzpicture}
\end{document}