squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

monostochastic.php
Go to the documentation of this file.
1 <?php
2 
20 
22 $bg = mt_rand(0,1);
23 
25 $bgrd = $bg * 128;
26 
28 $cmin_b = 0 + $bgrd;
29 $cmax_b = 127 + $bgrd;
30 
32 $rb = mt_rand($cmin_b,$cmax_b);
33 $gb = mt_rand($cmin_b,$cmax_b);
34 $bb = mt_rand($cmin_b,$cmax_b);
35 
37 $cmin_t = 128 - $bgrd;
38 $cmax_t = 255 - $bgrd;
39 
41 $rt = mt_rand($cmin_t,$cmax_t);
42 $gt = mt_rand($cmin_t,$cmax_t);
43 $bt = mt_rand($cmin_t,$cmax_t);
44 
46 for ($i = 0; $i <= 16; $i++) {
47  if ($i == 0 or $i == 3 or $i == 4 or $i == 5 or $i == 9 or $i == 10 or $i == 12 or $i == 16) {
48  $color[$i] = sprintf('#%02X%02X%02X',$rb,$gb,$bb);
49  } else {
50  $color[$i] = sprintf('#%02X%02X%02X',$rt,$gt,$bt);
51  }
52 }
$rb
$rb
Definition: monostochastic.php:32
sprintf
powered by Systran sprintf(_("Number of supported language pairs: %s"), '36').' '
Definition: options.php:107
$bb
$bb
Definition: monostochastic.php:34
$cmax_b
$cmax_b
Definition: monostochastic.php:29
$cmin_b
$cmin_b
Definition: monostochastic.php:28
$gt
$gt
Definition: monostochastic.php:42
$cmax_t
$cmax_t
Definition: monostochastic.php:38
$rt
$rt
Definition: monostochastic.php:41
$gb
$gb
Definition: monostochastic.php:33
sq_mt_randomize
sq_mt_randomize()
Definition: strings.php:522
$cmin_t
$cmin_t
Definition: monostochastic.php:37
$bt
$bt
Definition: monostochastic.php:43
$color
$color
Definition: load_prefs.php:28
$bgrd
$bgrd
Definition: monostochastic.php:25
$bg
$bg
Definition: monostochastic.php:22