[Tex/LaTex] How to change color and thickness of headsepline and fromrule in scrlttr2

colorscrlttr2

I want to change the color and thickness of headsepline and fromrule using the standard scrlttr2 class with the options:

headsepline=on
fromrule=aftername

Best Answer

The following MWE gives red, 5pt line on page one and two:

\documentclass{scrlttr2}
\usepackage{scrlayer-scrpage,xcolor}

\KOMAoptions{headsepline=true,       % Syntax error corrected 8.2.2020
            headsepline=5pt:,
            fromrule=aftername}

\addtokomafont{headsepline}{\color{red}}
\addtokomafont{fromrule}{\color{red}}
\makeatletter
\@setplength{fromrulethickness}{5pt}
\makeatother

\begin{document}
\begin{letter}{%
            Ernst Hemingway\\
            Main street\\
            2300\enspace\ PAMPLONA%
}

\setkomavar{yourref}{---}
\setkomavar{myref}{2013--999}
\setkomavar{date}{18. januar 2013}

\opening{}

Bulls are nice, but the last general meeting was about one year ago.
I want to remind you, that the constitution of our
club advises you to make a general meeting every
six month. Because of this I expect the executive
board to detain such a meeting immediately.

\pagebreak

I want to remind you, that the constitution of our
club advises you to make a general meeting every
six month. Because of this I expect the executive
board to detain such a meeting immediately.


\closing{Thank you}

\end{letter}
\end{document}

See page 226 and page 54 in the KOMA-script manual (v3.18).

enter image description here enter image description here