As they said, you have an infinite recursive loop, and why you get stack overflows.
As a quick fix, remove this line from BackGroundColorArrangerBase:
BackGroundColorArranger(x, Color.FromArgb(z));
So it looks like this:
void BackGroundColorArrangerBase(int z)
{
Panel panel = new Panel();
panel.ID = z.ToString();
panel.Width = 150;
panel.Height = 50;
panel.BackColor = Color.FromArgb(z);
this.Controls.Add(panel);
}
. , , . , , BackGroundColorArranger -WITH A DIFFERENT COLOR PAIR, colorpair .
, , BackGroundColorArranger ... , . ArrangerBase, .