[pstricks] colors
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Wed Jun 1 21:04:57 CEST 2005
Hello all,
Uwe pointed me to an important fact of xcolor, the colorseries.
With this macro it is easy to use the colors by an index.
The color is set by "linecolor={name!![index]}". The braces are
not needed when using \psset
Herbert
\listfiles
\documentclass{article}
\usepackage{multido}
\usepackage{pstricks}
%
\begin{document}
\definecolorseries{testA}{rgb}{last}{red}{blue}
\resetcolorseries[200]{testA}% defines a series of 200 colors
\definecolorseries{testB}{rgb}{step}[rgb]{0.95,0.85,0.55}{0.17,0.47,0.37}
\resetcolorseries{testB}% defines a series of 16 colors (default)
\begin{pspicture}(-5,-2)(5,5)
\psset{linewidth=1.5pt}
\multido{\iA=0+1,\rA=0.0+0.025}{200}{%
\psline[linecolor={testA!![\iA]}](-5,-\rA)(5,\rA)}
\end{pspicture}
\begin{pspicture}(-5,-5)(5,5)
\psset{linewidth=3pt}
\multido{\iA=0+1,\rA=0.0+0.3}{16}{%
\psline[linecolor={testB!![\iA]}](-5,-\rA)(5,\rA)}
\end{pspicture}
\end{document}
--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
More information about the PSTricks
mailing list