Solution Idea
At the start of each paragraph, generate three random numbers between 0 and 255, use them as RGB parameters to generate a color, apply the color at the start of paragraph.
The Code
\documentclass{article}
\usepackage{insdljs}
\usepackage{rangen}
\usepackage{xcolor}
\usepackage{lipsum}
\def\randomlycolorparagraph{%
% Get random color paramaters
\RandomZ{\R}{0}{255}%\R
\RandomZ{\G}{0}{255}%\G
\RandomZ{\B}{0}{255}%\B
% Generate random color
\definecolor{randomcolor}{RGB}{\R,\G,\B}
% Use color
\color{randomcolor}}
\def\randomlycoloreveryparagraph{\everypar={\randomlycolorparagraph}}
\AtBeginDocument{\randomlycoloreveryparagraph}
\begin{document}
\lipsum[1-40]
\end{document}
Solution Details
This solution uses the rangen package, specifically the \RandomZ
command
to generate three random numbers between 0 and 255. These three numbers
are then used as RGB values in the
\definecolor
command from xcolor package.
All the above are bundled in a macro which is applied at the start of a paragraph using the \everypar
command.
I went one step further and hooked the
\everypar
with \AtBeginDocument
. So, the random color effect starts
at the start of a document. Should you want the random effect start at some
mid point, please put the
\randomlycoloreveryparagraph
command where you want the random effect to start.
The Output

Your output is likely to look different. The colors are supposed to be random.
Tips
Should you want the RGB values in a certain range, tweak the range values
in the \RandomZ
commands.