copyright update
[squirrelmail.git] / themes / monostochastic.php
CommitLineData
95b5b26d 1<?php
95b5b26d 2
ed430208 3/**
4 * monostochastic.php
c4309fbd 5 * Name: Monostochastic
c4309fbd 6 * Date: October 20, 2001
7 * Comment: Generates random two-color frames, featuring either
8 * a dark or light background.
ed430208 9 *
4b4abf93 10 * @author Jorey Bump
47ccfad4 11 * @copyright &copy; 2000-2006 The SquirrelMail Project Team
4b4abf93 12 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
13 * @version $Id$
c4309fbd 14 * @package squirrelmail
15 * @subpackage themes
ed430208 16 */
95b5b26d 17
c4309fbd 18/** seed the random number generator */
ed430208 19sq_mt_randomize();
95b5b26d 20
ed430208 21/** light(1) or dark(0) background toggle **/
22$bg = mt_rand(0,1);
eb548244 23
ed430208 24/** range delimiter **/
25$bgrd = $bg * 128;
95b5b26d 26
ed430208 27/** background **/
28$cmin_b = 0 + $bgrd;
29$cmax_b = 127 + $bgrd;
95b5b26d 30
ed430208 31/** generate random color **/
32$rb = mt_rand($cmin_b,$cmax_b);
33$gb = mt_rand($cmin_b,$cmax_b);
34$bb = mt_rand($cmin_b,$cmax_b);
95b5b26d 35
ed430208 36/** text **/
37$cmin_t = 128 - $bgrd;
38$cmax_t = 255 - $bgrd;
95b5b26d 39
ed430208 40/** generate random color **/
41$rt = mt_rand($cmin_t,$cmax_t);
42$gt = mt_rand($cmin_t,$cmax_t);
43$bt = mt_rand($cmin_t,$cmax_t);
95b5b26d 44
ed430208 45/** set array element as hex string with hashmark (for HTML output) **/
ecf5c1bd 46for ($i = 0; $i <= 15; $i++) {
ed430208 47 if ($i == 0 or $i == 3 or $i == 4 or $i == 5 or $i == 9 or $i == 10 or $i == 12) {
1681f4d9 48 $color[$i] = sprintf('#%02X%02X%02X',$rb,$gb,$bb);
ed430208 49 } else {
1681f4d9 50 $color[$i] = sprintf('#%02X%02X%02X',$rt,$gt,$bt);
ed430208 51 }
52}
95b5b26d 53
ed430208 54/* Reference from http://www.squirrelmail.org/wiki/CreatingThemes
95b5b26d 55
ed430208 56$color[0] = '#xxxxxx'; // Title bar at the top of the page header
57$color[1] = '#xxxxxx'; // Not currently used
58$color[2] = '#xxxxxx'; // Error messages (usually red)
59$color[3] = '#xxxxxx'; // Left folder list background color
60$color[4] = '#xxxxxx'; // Normal background color
61$color[5] = '#xxxxxx'; // Header of the message index
62 // (From, Date,Subject)
63$color[6] = '#xxxxxx'; // Normal text on the left folder list
64$color[7] = '#xxxxxx'; // Links in the right frame
65$color[8] = '#xxxxxx'; // Normal text (usually black)
66$color[9] = '#xxxxxx'; // Darker version of #0
67$color[10] = '#xxxxxx'; // Darker version of #9
68$color[11] = '#xxxxxx'; // Special folders color (INBOX, Trash, Sent)
69$color[12] = '#xxxxxx'; // Alternate color for message list
70 // Alters between #4 and this one
71$color[13] = '#xxxxxx'; // Color for quoted text -- > 1 quote
72$color[14] = '#xxxxxx'; // Color for quoted text -- >> 2 or more
95b5b26d 73
ed430208 74*/
95b5b26d 75
eb548244 76?>