Oh before I forget, I did try using a bigger palette as you can see in code here:
pal
(i
) = _RGB32(i
* 31, i
* 17, i
* 8)
But more colors makes it run longer for each diameter for sand pile to spread out, it's more fun to see designs as pile spreads as fast as possible. I was hoping designs might be more interesting with more colors but I didn't think so but you can try by changing wait... I will rewrite.