0

I am using the scrlttr2 class of Koma Script and I would like to use a different color for the letterhead, which contains my address on the top of the page.

Is there a simple way to apply the command \color{colorname} at the whole letterhead? Or, to stay more general, to apply a style such as \sffamily etc.?

The only way I figured out is to put the command in each definition of \setkomavar, but it does not even fully solve the problem because the separators are not affected.

Many thanks!

  • 1
    \addtokomafont{fromaddress}{\color{red!40!black}}\addtokomafont{fromname}{\color{red!40!black}} – Johannes_B Jun 4 '16 at 11:51
  • @Johannes_B Can you answer this question? – esdd Jun 15 '16 at 16:03
2

The code at the bottom leads to the next image.

pietroScrlttrColour

\documentclass[fromphone=true]{scrlttr2}
\usepackage{xcolor}
\usepackage{lipsum}
\setkomavar{fromname}{Pietro}
\setkomavar{fromaddress}{Strawberry fields\\ Land of jam}
\setkomavar{fromphone}{555-jam}
\addtokomafont{fromaddress}{\color{red!70!black}}
\addtokomafont{fromname}{\color{red!70!black}}
\begin{document}
\begin{letter}{Marmelade\\Chilichutneytown}
    \opening{My sweet dear,}
    \lipsum
    \closing{your jam boy}
\end{letter}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.