Consider the following PSTricks code:
\documentclass{article}
\usepackage{pstricks,multido}
\psset{dimen = m, fillstyle = solid}
\begin{document}
\begin{figure}
\centering
\begin{pspicture}(12,12)
\psframe[fillcolor = orange](0,11)(1,12)
\rput(0.5,11.5){$\cdot$}
\multido{\iA = 1+1, \iB = 10+-1}{11}{
\psframe[fillcolor = orange](\iA,11)(!\iA\space 1 add 12)
\rput(!\iA\space 0.5 add 11.5){$\iA$}
\psframe[fillcolor = orange](0,\iB)(!1 \iB\space 1 add)
\rput(!0.5 \iB\space 0.5 add){$\iA$}
\multido{\iC = 0+1}{11}{\psframe(\iA,\iC)(!\iA\space 1 add \iC\space 1 add)}}
\end{pspicture}
\caption{Multiplication table.}
\end{figure}
\end{document}

Questions
- How do I automatically genrate the numbers in the multiplication table? (I've had a look at the code in section 14 of the
pstricks-addmanual but without any luck.) - How (if possible) do I automatically colour all the squares in the sequence, say, n*(n+6) (i.e., the two diagonals of squares containing the numbers 6, 14, 24, 36, 50, 66)?
P.S. If no PSTricks solution can be found, a TikZ solution is also acceptable but I prefer PSTricks. :)
Update
I should probably add that I only need rows, column, or diagonals coloured; not, say, 4, 15, 30, 49, 72, 99. (If someone can come up with code that can automatically colour such a sequence, it will of course be even better but it's not necessary.)
Update 2
Here is what I now have:
\documentclass{article}
\usepackage{pstricks,multido}
\psset{dimen = m, fillstyle = solid}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \calc \fp_eval:n
\ExplSyntaxOff
\begin{document}
\def\tableSize{11}
\begin{figure}
\centering
\begin{pspicture}(\calc{\tableSize+1},\calc{\tableSize+1})
\psframe[fillstyle = solid, fillcolor = orange](0,\tableSize)(1,\calc{\tableSize+1})
\rput(0.5,\calc{\tableSize+0.5}){$\cdot$}
\multido{\iA = 1+1, \iB = \calc{\tableSize-1}+-1}{\tableSize}{%
\psframe[fillcolor = orange](\iA,\tableSize)(\calc{\iA+1},\calc{\tableSize+1})
\rput(\calc{\iA+0.5},\calc{\tableSize+0.5}){$\iA$}
\psframe[fillcolor = orange](0,\iB)(1,\calc{\iB+1})
\rput(0.5,\calc{\iB+0.5}){$\iA$}
\multido{\iC = 1+1}{\tableSize}{%
\psframe(\iA,\calc{\tableSize+1-\iC})(\calc{\iA+1},\calc{\tableSize-\iC})
\rput(\calc{\iA+0.5},\calc{\tableSize+0.5-\iC}){$\calc{\iA*\iC}$}}}
\end{pspicture}
\caption{Multiplication table.}
\end{figure}
\end{document}

I found a PSTricks solution myself where arbitrary "horizontal", "vertical", and "diagonal" series can be colored.
Macro syntax
\tableColorRow[<row color>]{<now number>}
\tableColorColumn[<column color>]{<column number>}
\tableColorDiagonal[<diagonal color>]{<starting row/column number>}
Code
\documentclass{article}
\usepackage{pstricks,multido}
\usepackage{bm}
\psset{dimen = m, fillstyle = solid}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \calc \fp_eval:n
\ExplSyntaxOff
% create table
\def\tableArithmetic[#1]#2{%
\psframe[fillcolor = #1](0,\tableSize)(1,\calc{\tableSize+1})
\rput(0.5,\calc{\tableSize+0.5}){$\boldsymbol{#2}$}
\multido{\iA = 1+1, \iB = \calc{\tableSize-1}+-1}{\tableSize}{%
\psframe[fillcolor = #1](\iA,\tableSize)(\calc{\iA+1},\calc{\tableSize+1})
\rput(\calc{\iA+0.5},\calc{\tableSize+0.5}){\fontSize $\iA$}
\psframe[fillcolor = #1](0,\iB)(1,\calc{\iB+1})
\rput(0.5,\calc{\iB+0.5}){\fontSize $\iA$}
\multido{\iC = 1+1}{\tableSize}{%
\psframe(\iA,\calc{\tableSize+1-\iC})(\calc{\iA+1},\calc{\tableSize-\iC})
\rput(\calc{\iA+0.5},\calc{\tableSize+0.5-\iC}){\fontSize $\calc{\iA*\iC}$}%
}%
}%
}
% color row
\def\tableColorRow[#1]#2{%
\multido{\i = 1+1}{\tableSize}{%
\psframe[fillcolor = #1](\i,\calc{\tableSize-#2})(\calc{\i+1},\calc{\tableSize-#2+1})
\rput(\calc{\i+0.5},\calc{\tableSize-#2+0.5}){\fontSize $\calc{\i*#2}$}%
}%
}
% color column
\def\tableColorColumn[#1]#2{%
\multido{\iA = 1+1, \iB = \calc{\tableSize-1}+-1}{\tableSize}{%
\psframe[fillcolor = #1](#2,\iB)(\calc{#2+1},\calc{\iB+1})
\rput(\calc{#2+0.5},\calc{\iB+0.5}){\fontSize $\calc{\iA*#2}$}%
}%
}
% color diagonal
\def\tableColorDiagonal[#1]#2{%
\multido{\iA = 1+1, \iB = #2+1, \iC = \calc{\tableSize-#2}+-1, \iD = \calc{\tableSize-1}+-1}{\calc{\tableSize-#2+1}}{%
\psframe[fillcolor = #1](\iA,\iC)(\calc{\iA+1},\calc{\iC+1})
\rput(\calc{\iA+0.5},\calc{\iC+0.5}){\fontSize $\calc{\iA*(\iA+#2-1)}$}
\psframe[fillcolor = #1](\iB,\iD)(\calc{\iB+1},\calc{\iD+1})
\rput(\calc{\iB+0.5},\calc{\iD+0.5}){\fontSize $\calc{\iA*(\iA+#2-1)}$}%
}%
}
\begin{document}
\begin{figure}
\def\tableSize{11}
\def\fontSize{%
% \Huge
% \huge
% \LARGE
% \Large
% \large
\normalsize
% \small
% \footnotesize
% \scriptsize
% \tiny
}
\centering
\begin{pspicture}(\calc{\tableSize+1},\calc{\tableSize+1})
\tableArithmetic[orange!80]{\cdot}
\tableColorRow[blue!70]{8}
\tableColorColumn[red!70]{2}
\tableColorDiagonal[green!80]{6}
\end{pspicture}
\caption{Multiplication table.}
\end{figure}
\end{document}
Output







n * (n+6)color7 = 1 * 7,16 = 2 * 8,27 = 3 * 9, etc? – Qrrbrbirlbel Jun 01 '15 at 17:50:)– Svend Tveskæg Jun 01 '15 at 21:14