X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=themes%2Fdarkness.php;h=a6e11c6a3233091aca5bb6a26b7ee22816bd107d;hb=9d953ce021e62a3c6f7598d51025c891e9a69890;hp=c8db65e4a8d3bdd8aa66c604338445d69be8b4e9;hpb=d471141572d11da532f0c8fb36ee86c0a42bd8bb;p=squirrelmail.git diff --git a/themes/darkness.php b/themes/darkness.php index c8db65e4..a6e11c6a 100755 --- a/themes/darkness.php +++ b/themes/darkness.php @@ -1,12 +1,23 @@ ' . "\n"; + 'blendTrans(Duration=2.0)" />' . "\n"; } - -?> - 0) { // Some background colors - $r = mt_rand(32,64); - $g = $r; - $b = $r; - if (IsUnique($targetDistance, $r, $g, $b, $used)) { + $r = mt_rand(24,64); + $unique = true; + foreach ($used as $col) { + if (abs($r - $col) < $targetDistance) + $unique = false; + } + if ($unique) { $i = array_shift($Left); - $color[$i] = sprintf("#%02X%02X%02X",$r,$g,$b); - $used[] = array($r, $g, $b); - $targetDistance = $TargetDistance; + $color[$i] = sprintf('#%02X%02X%02X',$r,$r, $r); + $used[] = $r; + $targetDistance = $BackgroundTargetDistance; } else { - $targetDistance *= 0.9; + $targetDistance -= $BackgroundAdjust; } } - + // Set the error color to some shade of red $r = mt_rand(196, 255); $g = mt_rand(144, ($r * .8)); - $color[2] = sprintf("#%02X%02X%02X", $r, $g, $g); + $color[2] = sprintf('#%02X%02X%02X', $r, $g, $g); $used = array(array($r, $g, $g)); - + // Set normal text colors $cmin = 196; $cmax = 255; @@ -96,17 +110,17 @@ $squirrelmail_plugin_hooks['generic_header']['theme_darkness'] = $r = mt_rand($cmin,$cmax); $g = mt_rand($cmin,$cmax); $b = mt_rand($cmin,$cmax); - $color[$i] = sprintf("#%02X%02X%02X",$r,$g,$b); + $color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b); $used[] = array($r, $g, $b); } - + $Left = array(1, 7, 11, 13, 14, 15); - $targetDistance = $TargetDistance; + $targetDistance = $TextTargetDistance; while (count($Left) > 0) { // Text colors -- Try to keep the colors distinct $cmin = 196; $cmax = 255; - + /** generate random color **/ $r = mt_rand($cmin,$cmax); $g = mt_rand($cmin,$cmax); @@ -114,11 +128,11 @@ $squirrelmail_plugin_hooks['generic_header']['theme_darkness'] = if (IsUnique($targetDistance, $r, $g, $b, $used)) { $i = array_shift($Left); - $color[$i] = sprintf("#%02X%02X%02X",$r,$g,$b); - $used[] = array($r, $g, $b); - $targetDistance = $TargetDistance; + $color[$i] = sprintf('#%02X%02X%02X',$r,$g,$b); + $used[] = array($r, $g, $b); + $targetDistance = $TextTargetDistance; } else { - $targetDistance *= 0.9; + $targetDistance *= $TextAdjust; } } @@ -138,9 +152,9 @@ b 9: Darker version of #0 b 10: Darker version of #9 f 11: Special folders color [Inbox, Trash, Sent] b 12: Alternate color for message list [alters between 4 and this one] -f 13: Color for single-quoted text ("> text") when reading (default: #800000) +f 13: Color for single-quoted text ('> text') when reading (default: #800000) f 14: Color for text with more than one quote (default: #FF0000) **/ -?> +?> \ No newline at end of file