1<?php 2 3/** 4 * kind_of_blue.php 5 * Name: Kind of Blue 6 * Date: October 20, 2001 7 * Comment: This theme generates random colors, featuring a 8 * light bluish background with dark text. 9 * 10 * @author Jorey Bump 11 * @copyright 2000-2021 The SquirrelMail Project Team 12 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 13 * @version $Id: kind_of_blue.php 14885 2021-02-05 19:19:32Z pdontthink $ 14 * @package squirrelmail 15 * @subpackage themes 16 */ 17 18/** seed the random number generator */ 19sq_mt_randomize(); 20 21for ($i = 0; $i <= 16; $i++) { 22 /* background/foreground toggle */ 23 if ($i == 0 or $i == 3 or $i == 4 or $i == 5 or $i == 9 or $i == 10 or $i == 12 or $i == 16) { 24 /* background */ 25 $b = mt_rand(248,255); 26 $r = mt_rand(180,255); 27 $g = mt_rand(178,$r); 28 } else { 29 /* text */ 30 $cmin = 0; 31 $cmax = 128; 32 33 /** generate random color **/ 34 $b = mt_rand($cmin,$cmax); 35 $g = mt_rand($cmin,$cmax); 36 $r = mt_rand($cmin,$cmax); 37 } 38 39 /* set array element as hex string with hashmark (for HTML output) */ 40 $color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b); 41} 42