private static function _setRandColor() { if (!self::$isRandColor) { self::$_color = imagecolorallocate(self::$_image, 0, 0, 0); } else { self::$_color = imagecolorallocate(self::$_image, mt_rand(0, 255), mt_rand(0, 120), mt_rand(0, 255)); } }