<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class ColorUtil { private static $colors = array('#FF7F50', '#DC143C', '#9932CC', '#B22222', '#DAA520', '#FF69B4', '#20B2AA', '#9370DB', '#3CB371', '#7B68EE', '#C71585', '#191970', '#FF8C00', '#DB7093', '#CD853F', '#BC8F8F', '#EE82EE', '#8B4513', '#FA8072', '#2E8B57', '#6B8E23', '#FF6347', '#ED3F14', '#4F7FF3', '#6A46BD', '#E9BD6C'); public static function randomColors() { return self::$colors; } public static function randomColor() { goto Xw9oB; iSkJH: return $K_9UF; goto ZfdAQ; Xw9oB: static $K_IJ6 = 0; goto kXFix; kXFix: $K_9UF = self::$colors[$K_IJ6++ % count(self::$colors)]; goto iSkJH; ZfdAQ: } public static function pick($X68Kz) { $K_IJ6 = abs(crc32($X68Kz)) % count(self::$colors); return self::$colors[$K_IJ6]; } public static function adjust($WoL9F, $EFPE5) { goto ksJ1O; zEZzx: $Y0hfs = hexdec($Wv5mE); goto Y3S0o; RSy8P: $t2Eot = max(0, min(255, $t2Eot + $EFPE5)); goto N3n9H; N3n9H: return '#' . strtoupper(join('', array(str_pad(dechex($INqYM), 2, '0'), str_pad(dechex($Y0hfs), 2, '0'), str_pad(dechex($t2Eot), 2, '0')))); goto C2mmi; Y3S0o: $t2Eot = hexdec($aR7EL); goto WxruB; ApmzK: $Y0hfs = max(0, min(255, $Y0hfs + $EFPE5)); goto RSy8P; WxruB: $INqYM = max(0, min(255, $INqYM + $EFPE5)); goto ApmzK; PFaK8: $aR7EL = substr($WoL9F, 4, 2); goto JFsyF; ksJ1O: $WoL9F = strtoupper($WoL9F); goto X1b0O; DFlxv: $WoL9F = str_replace('#', '', $WoL9F); goto q_yPY; JFsyF: $INqYM = hexdec($CeMi1); goto zEZzx; X1b0O: if (!preg_match('/^#[A-F0-9]{6}$/', $WoL9F)) { return $WoL9F; } goto DFlxv; veBoh: $Wv5mE = substr($WoL9F, 2, 2); goto PFaK8; q_yPY: $CeMi1 = substr($WoL9F, 0, 2); goto veBoh; C2mmi: } }