# Is it possible to change text color for all headings?

I want to change only the color (not font size, etc.) of all headings in my documents (\section, \subsection, \subsubsection, ...). I want to keep all other settings fixed.

Is there a way to do this?

sectsty allows you to modify sectional heading fonts on a case-by-case basis, or all at once. For example, to modify only the \subsection fonts, use \subsectionfont{<font defs>}:

\documentclass{article}
\usepackage{sectsty}% http://ctan.org/pkg/sectsty
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\sectionfont{\color{red}}
\subsectionfont{\color{green!80!black}}
\subsubsectionfont{\color{blue!50!white}}
\begin{document}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}


For all sections, use \allsectionsfont{<font defs>}:

\documentclass{article}
\usepackage{sectsty}% http://ctan.org/pkg/sectsty
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\allsectionsfont{\color{black!30!green!50!cyan}}
\begin{document}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}


If you're using a KOMA-Script class you don't need an additional package (besides the color package, of course) but can use \addtokomafont. Adapting Werner's examples:

\documentclass{scrartcl}
\usepackage{xcolor}

\begin{document}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}


Or all sections with the same color:

\documentclass{scrartcl}
\usepackage{xcolor}