I'd like to use Tikz to algorithmically generate some text that has a color value based on calculations. Take the following, for example:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \i in {0, 1, ..., 10} {
\draw (\i, 0) node {\textcolor[gray]{0.5}A};
}
\end{tikzpicture}
\end{document}
This displays a row of "A"s in a gray:
How do I go about calculating the 0.5
value to, for example, display this set of "A"s in varying levels of gray, such as a black to white gradient? Could I use this same method to calculate arbitrary RGB values?