xxxxxxxxxx
\usepackage{xcolor}
\textcolor{<red|blue|green>}{<text goes here>}
xxxxxxxxxx
\usepackage{xcolor}
\begin{document}
This is a sample text in black.
{\color{red} this is a simple text in black}
\end{document}
*make sure you have \usepackage{xcolor} in your preamble as shown in line 1*
xxxxxxxxxx
\textcolor{<color name goes here}{<the text which you want to color goes here>}
xxxxxxxxxx
\usepackage{color}
%for more functionality:
\usepackage{xcolor}
\pagecolor{color}
\color{color}
\colorbox{color}{text}