summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgi/index.pl2
-rw-r--r--cgi/templates/display.html.ep2
2 files changed, 3 insertions, 1 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index 3ce8415..022022f 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -264,6 +264,7 @@ sub get_departures {
sub render_html {
my $self = shift;
+ my $color = $self->param('color') || '255,208,0';
my ( $departures, $errstr ) = get_departures(
city => $self->stash('city'),
@@ -284,6 +285,7 @@ sub render_html {
$self->render(
'display',
title => "vrr-fakedisplay v${VERSION}",
+ color => [ split( qr{,}, $color ) ],
departures => $departures,
scale => $self->param('scale') || '4.3',
);
diff --git a/cgi/templates/display.html.ep b/cgi/templates/display.html.ep
index 234068b..02f974c 100644
--- a/cgi/templates/display.html.ep
+++ b/cgi/templates/display.html.ep
@@ -13,7 +13,7 @@
body {
font-family: VRRR;
background-color: #000000;
- color: #ffd000;
+ color: #<%= join(q{}, map { sprintf('%02x', $_) } @{$color} ) %>;
font-size: <%= $scale * 100 %>%;
}