diff --git a/pool/page_blocks.php b/pool/page_blocks.php index 706e3a78..bce95e0e 100644 --- a/pool/page_blocks.php +++ b/pool/page_blocks.php @@ -1,5 +1,36 @@ 255) + $grn = 255; + + if ($grn > 190) + $fg = 'blue'; + else + $fg = 'white'; + $bg = sprintf("#00%02x00", $grn); + } + else # ($erl > 0.5) + { + $ref = (-0.3 - log10(1.0 - $erl)) * 255; + if ($red < 0) + $red = 0; + if ($red > 255) + $red = 255; + + $fg = 'white'; + $bg = sprintf("#%02x0000", $red); + } + + return array($fg, $bg); +} +# function pctcolour($pct) { if ($pct == 100) @@ -79,14 +110,19 @@ function doblocks($data, $user) $desc = $ans['s_desc:'.$i]; $diff = number_format(100 * $ans['s_diffratio:'.$i], 2); $mean = number_format(100 * $ans['s_diffmean:'.$i], 2); - $cdferl = number_format($ans['s_cdferl:'.$i], 4); + + $cdferl = $ans['s_cdferl:'.$i]; + list($fg, $bg) = erlcolour($cdferl); + $cdferldsp = "".number_format($cdferl, 4).''; + $bg = " bgcolor=$bg"; + $luck = number_format(100 * $ans['s_luck:'.$i], 2); $pg .= "