\documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel}

\usepackage{xcolor}

\begin{document}

This example shows different examples on how to use the \texttt{xcolor} package to change the colour of elements in \LaTeX.

\begin{itemize} \color{blue} \item First item \item Second item \end{itemize}

\noindent {\color{red} \rule{\linewidth}{0.5mm} }

\end{document}

Community content is available under CC-BY-SA unless otherwise noted.