\documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[dvipsnames]{xcolor} \begin{document} This example shows different examples on how to use the \texttt{xcolor} package to change the colour of elements in \LaTeX. {\color{blue}Text colored with \texttt{\\blue}} \noindent {\color{red} \rule{\linewidth}{0.5mm} } The background colour of some text can also be \textcolor{red}{easily} set. For instance, you can change to orange the background of \colorbox{BurntOrange}{this text} and then continue typing. \end{document}