[Tex/LaTex] Using MikTeX how can we color some text

colortcolorbox

I am using MikTeX 2.9 on Windows 8.1. The PDF output of the Following TeX file does not display the word "example" in fore color or background color. I'm using TeXWorks editor – that comes with MikTeX – to generate the PDF:

\documentclass{article}
\begin{document}
This is an {\color{green}example} of fore color text.
This is an \colorbox{green}{example} of highlighted text.
\end{document}

Best Answer

add

\usepackage{color}

to the preamble