Cayley table group visualization 
how can I make graphics like this? random colors. I got a script in GAP that prints rows of numbers but I want it colored
just random colors
G:=Units(Integers mod 2^3);
n:=Order(G);
M:=MultiplicationTable(G);

for i in [1..n] do
for j in [1..n] do
Print(M[i][j]," ");
od;
Print("\n");
od;
Print("\n");

I'd like to see group table so I can think about the group better
 1 2 3 4
 2 1 4 3
 3 4 1 2
 4 3 2 1

 A: You can do something like what you're asking for directly in GAP if you're running in a terminal that can interpret colour escapes.  I don't know whether this will work in Windows, but it seems to work okay on UNIX.
Define some colours:
FGC := [ "30m", "31m", "32m", "33m", "34m", "35m", "36m", "37m" ];; # foreground colours
BGC := [ "40m", "41m", "42m", "43m", "44m", "45m", "46m", "47m" ];; # background colours

For your small example, we only need the foreground colours, but you could handle a larger group by using various combinations of foreground and background colours.  Modify your loop as follows.
for i in [1..n] do
for j in [1..n] do
    k := M[ i ][ j ];
    Print( "\033[", FGC[ k ] ); # set colour
    Print( k );                 # print number
    Print( "\033[0m" );         # reset
    Print( " " );               # space
od;
Print( "\n" );
od;;

I get something like this in my terminal:

It's not as nice as the graphical solutions, but it does give you something without having to move your data to another package.  You might be able to develop this idea into something more complete.
A: I don't know how you could do it in GAP, but if you take it out of GAP and put it into Mathematica in the form {{1,2,3,4},{2,1,4,3},{3,4,1,2},{4,3,2,1}} (which should be easy) then you can use MatrixPlot.  For example,
A = {{1,2,3,4},{2,1,4,3},{3,4,1,2},{4,3,2,1}};
MatrixPlot[A, ColorFunction -> "Rainbow", Frame -> False]

yields
.
You can see the full set of preset color schemes here.  If you don't like those you can make your own without much extra work.
A: I know I'm jumping in quite late here, but for posterity, here is what I used in Sage 6.4:
C=AbelianGroup([2,2])
M=C.cayley_table().table()
matrix_plot(M)


Matrix plot has various colour options.  Try
matrix_plot(M,options={'cmap':'winter'})

A: If you have access to Maple, there is a built-in command to do this.  You can create the Cayley table fairly directly from the GAP matrix in Maple as follows.
M := [ [ 1, 2, 3, 4 ], [ 2, 1, 4, 3 ], [ 3, 4, 1, 2 ], [ 4, 3, 2, 1 ] ]:
m := Matrix( M ):
with( Magma ):
CayleyColourTable( m );

This produces an image something like this:

Then you can use options to tweak the output.
A: You could also write a GAP script to output the matrix to R.  For example:
MatrixToR:=function(M)
  local nrow,ncol;
  nrow:=Size(M);
  ncol:=Size(M[1]);
  Print("A = matrix(c(");
  for i in [1..nrow] do
    for j in [1..ncol] do
      if(i=nrow and j=ncol) then Print(M[i][j]); continue; fi;
      Print(M[i][j],", ");
    od;
  od;
  Print("),nrow=",nrow,",ncol=",ncol,",byrow=TRUE)\n");
end;;

So, if we run this
MatrixToR(MultiplicationTable(Random(AllSmallGroups(12))));

it produces:
A = matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 1, 5, 6, 3, 4, 9, 10, 7, 8, 12, 11, 3, 5, 1, 7, 2, 9, 4, 11, 6, 12, 8, 10, 4, 6, 7, 8, 9, 10, 11, 1, 12, 2, 3, 5, 5, 3, 2, 9, 1, 7, 6, 12, 4, 11, 10, 8, 6, 4, 9, 10, 7, 8, 12, 2, 11, 1, 5, 3, 7, 9, 4, 11, 6, 12, 8, 3, 10, 5, 1, 2, 8, 10, 11, 1, 12, 2, 3, 4, 5, 6, 7, 9, 9, 7, 6, 12, 4, 11, 10, 5, 8, 3, 2, 1, 10, 8, 12, 2, 11, 1, 5, 6, 3, 4, 9, 7, 11, 12, 8, 3, 10, 5, 1, 7, 2, 9, 4, 6, 12, 11, 10, 5, 8, 3, 2, 9, 1, 7, 6, 4),nrow=12,ncol=12,byrow=TRUE)

which can be input into R an plotted in colour using the plotrix function color2D.matplot, as follows
require(plotrix)
color2D.matplot(A)

which will plot

(You may need to run install.packages("plotrix") to install the R package.)
A: You might find interesting a computer app called Group Explorer.
The app provides visualizations of 59 groups.
All visualizations can be exported via clipboard.
Here are some features of multiplication table visualizations:
Coloration



Subgroup organization



Separation of cosets





