|
|
@ -4,8 +4,8 @@ function pctcolour($pct) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($pct == 100) |
|
|
|
if ($pct == 100) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$fg = '#fff'; |
|
|
|
$fg = 'white'; |
|
|
|
$bg = '#000'; |
|
|
|
$bg = 'black'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($pct < 100) |
|
|
|
if ($pct < 100) |
|
|
@ -17,9 +17,9 @@ function pctcolour($pct) |
|
|
|
$grn = 255; |
|
|
|
$grn = 255; |
|
|
|
|
|
|
|
|
|
|
|
if ($grn > 190) |
|
|
|
if ($grn > 190) |
|
|
|
$fg = '#00f'; |
|
|
|
$fg = 'blue'; |
|
|
|
else |
|
|
|
else |
|
|
|
$fg = '#fff'; |
|
|
|
$fg = 'white'; |
|
|
|
$bg = sprintf("#00%02x00", $grn); |
|
|
|
$bg = sprintf("#00%02x00", $grn); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ function pctcolour($pct) |
|
|
|
if ($red > 255) |
|
|
|
if ($red > 255) |
|
|
|
$red = 255; |
|
|
|
$red = 255; |
|
|
|
|
|
|
|
|
|
|
|
$fg = '#fff'; |
|
|
|
$fg = 'white'; |
|
|
|
$bg = sprintf("#%02x0000", $red); |
|
|
|
$bg = sprintf("#%02x0000", $red); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|