Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 )

Also is it possible to change the colour of table of contents to blue ? (again only the heading)

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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:

\chapterfont{\color{blue}}  % sets colour of chapters
\sectionfont{\color{cyan}}  % sets colour of sections

enter image description here

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


Put such definitions in the preamble as well.

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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