# Section Horizontal Lines - Change Color

how can i change color of section horizontal lines without change header color?

Code can be find here

PS - Im new on latex

• Welcome to TeX.SX! Please provide a minimal, but compilable code example (MWE) to help us help you. – TeXnician Aug 9 '17 at 8:17
• Welcome to TeX.SX! Here some more informations, which could help to create a minimal working example (MWE). – Bobyandbob Aug 9 '17 at 8:21
• The code you've posted is unfortunately no MWE. Please add a minimal document with the required packages. – TeXnician Aug 9 '17 at 8:25
• the code is not made by me, for that, i've some difficulties to find the line where the author defines section line color. – firewallcj Aug 9 '17 at 9:21

You have to change

\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]


to

\colorlet{titlerulecolor}{orange}
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[{\color{titlerulecolor}\titlerule}]


MWE:

\documentclass[a4paper,10pt]{article}
\usepackage{parskip}
\usepackage[usenames,dvipsnames]{xcolor}
\colorlet{titlerulecolor}{orange}

\usepackage{titlesec}
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[{\color{titlerulecolor}\titlerule}]
\titlespacing{\section}{0pt}{3pt}{3pt}

\begin{document}
\pagestyle{empty}
\section{Personal Data}
Text
\end{document}


Of course you can choose another color than orange.

Example for an rgb color:

\documentclass[a4paper,10pt]{article}
\usepackage{parskip}
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{titlerulecolor}{rgb}{.9,.1,.9}

\usepackage{titlesec}
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[{\color{titlerulecolor}\titlerule}]
\titlespacing{\section}{0pt}{3pt}{3pt}

\begin{document}
\pagestyle{empty}
\section{Personal Data}
Text
\end{document}


• one more thing, how can i put rgb colors instead standard color like "blue" or "green"? – firewallcj Aug 9 '17 at 21:58
• Example: \definecolor{titlerulecolor}{rgb}{.9,.1,.9}, see my updated answer. – esdd Aug 13 '17 at 16:36