I have chosen a specific color that I am using for my letters. The color is used in headings and titles. I also have a black and white image that I want to use as a background, but I want it to have my chosen color instead of black. Is there a simple way to do this, without tweaking the parameters by hand?
MWE
\documentclass[12pt]{article}
\usepackage[top=0.78in, left=1in, right=1in, bottom=1in]{geometry}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{scrpage2}
\usepackage{background}
\usepackage{lipsum}
\colorlet{MyColor1}{RoyalPurple}
\newcommand{\HRule}{\rule{\textwidth}{1.5pt}}
\pagestyle{scrheadings}
\clearscrheadfoot
\chead{{\color{MyColor1} \textsc{\Huge{My Name} \\[-1.5pt] \Large{some tagline}}\\ \Large{\vspace{-8.5pt}} \HRule}}
\footskip = 0pt
\cfoot{\newcommand{\NL}{ $\ast$ }
{\color{MyColor1} \HRule \textsc{\footnotesize{\\ My address} \footnotesize{ \\ my.email@server.com \NL webpage.com \\ +44 123 456 789}}}}
\backgroundsetup{contents={\includegraphics[decodearray={MyColor1}, width=0.1\textwidth]{example-image}}, angle=0, position=current page.south, anchor=above, vshift=10pt}
\begin{document}
{\color{MyColor1}\Huge Title}\\[1cm]
\lipsum[1-5]
\end{document}
decodearray
will not help, because it does not allow to change the color model, i.e., it does not convert gray images to the RGB color model. The PDF specification explains the feature and the syntax of the value fordecodearray
. – Heiko Oberdiek Mar 29 '18 at 16:52decodearray={0.38 1 0.25 1 0.6 1}
turns the black in my figure into the purple color I want. I'm just looking for an automatic way of doing it. – Kajsa Mar 29 '18 at 17:19