Randomize Color Scheme Selection in Theme

This:

$thm_out[array_rand($thm_out, 2)]

is the same as

$them_out[array(0,2)] where 0 and 2 are 2 random keys.

See array_rand

I hope you can see what is wrong there. Change that to:

$thm_out[array_rand($thm_out, 1)]

which is the same as

$them_out[2] where 2 is any random key.