# Can I change linenumber colour?

I've tried adding the lineno package to my document. It's nice but I would like to make the numbers a different colour, like a light grey or blue, if possible.

Can I do this in my style document where I add the package, somehow? I am already using the xcolor package as well.

• Change the colour... where? :D Are you talking about regular paragraphs? Or some environment like a table? Your question is very vague on this (or maybe I'm missing some very obvious information). – Alenanno May 27 '15 at 8:53
• Sorry if it's vague, what I wanted was to change the colour of the line numbers themselves. @AmbikaVanchinathan answered my question. :) – Stubbs May 27 '15 at 10:03
• Yeah I saw that. :D No problem. – Alenanno May 27 '15 at 10:11

If you want to change the colour of the line number to blue, then use this in your preamble:

\renewcommand{\linenumberfont}{\normalfont\bfseries\small\color{blue}}


Full code:

\documentclass{article}
\usepackage{xcolor}
\usepackage{lineno}
\usepackage{lipsum}
\renewcommand{\linenumberfont}{\normalfont\bfseries\small\color{blue}}
\begin{document}
\linenumbers
\lipsum[2-4]
\end{document}


• Sorry still new to this site, wasn't aware I had to click that green arrow. :) – Stubbs Jul 8 '15 at 18:15