# Change Colour on Chapter/Section headings {Lyx}

I am using Lyx and Layout report for my thesis. I would like to change the colour of chapters sections and subsections (only the headings) from black to blue.

I attach a screenshot in order to understand what colours i am trying to achieve only on headings (Chapter /section and subsection )

-

You can use the package `sectsty` to do change the headings, and `xcolor` to get the colour definitions.

For example, add to your preamble (Document --> Settings --> LaTeX preamble) the following:

``````\usepackage{xcolor}
\usepackage{sectsty}
\chapterfont{\color{blue}}  % sets colour of chapters
\sectionfont{\color{cyan}}  % sets colour of sections
``````

You can use colours predefined in `xcolor` (see manual), or define your own, e.g.

``````\definecolor{MyBlue}{rgb}{0.1,0.1,1}
``````

Put such definitions in the preamble as well.

-
Thanks i'll try this and ill come back if i have problems by using xcolor :) –  ALdaperan Oct 7 '12 at 9:03
@ALdaperan I forgot to mention that the TOC heading is just an unnumbered chapter, so that will also be influenced by `\chapterfont{\color{blue}}`. –  Torbjørn T. Oct 7 '12 at 9:19