I made a table with the following code and the hhline package:
\documentclass{article}
\usepackage{hhline}
\begin{document}
\begin{tabular}{l || l l l l l | l}
& 1 & 2 & 3 & 4 & 5 & 6\\\hhline{=#=====|=}
1 & 1 & 1 & 1 & 1 & 1 & 0\\
2 & 1 & 1 & 1 & 1 & 1 & 0\\
3 & 1 & 1 & 1 & 1 & 1 & 0\\
4 & 1 & 1 & 1 & 1 & 1 & 0\\
5 & 1 & 1 & 1 & 1 & 1 & 0\\\hline
6 & 0 & 0 & 0 & 0 & 0 & 1
\end{tabular}
\end{document}
Now, I would like to colour the 5×5 block in a specific colour, and the 1×1 block in another colour. The other cells should remain as they are.
I have seen Color merged and regular cells in a table individually which suggests \cellcolor, \rowcolor and columncolor - however, in this case I could only use \cellcolor, since there are no full rows or columns. But that would mean I have to type 26 times \cellcolor. Is there no efficient way to do this (either algorithmically or by colouring a whole block at once)?





\documentclassand the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Nov 21 '14 at 18:49