Yes, you're right. Changed the code to not compute the array. Also, changed a bit behavior of scrambling function (in v.5.2, scrambling 16x16 puzzle with Live XXX scheme was very slow). Updated online link.It would save some time to either store the result of getColors (updating when the puzzle size or color scheme is changed), or to just not compute the whole array each time, e.g.
I'll see if there are other ways to optimize speed. Also, the code is rather long and could be shortened (e.g., right now I have three separate functions for Ao5, Ao12 and Ao100).
Edit: should work more or less fast now. Also, uploaded 5.2 upd 2 offline.