From 818c55df5a1526b37b6d6c4e89931962abd88a5f Mon Sep 17 00:00:00 2001 From: Ana Date: Thu, 30 Jun 2016 11:03:08 +0200 Subject: [PATCH] Tracks color in all events takes background into account. It uses https://github.com/openSUSE/osem/pull/1044 to select black or white color for the track text depending on what of them contrast more with the track background. --- app/views/conference/_event.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/conference/_event.html.haml b/app/views/conference/_event.html.haml index c556a9f1..98c835d3 100644 --- a/app/views/conference/_event.html.haml +++ b/app/views/conference/_event.html.haml @@ -29,5 +29,5 @@ - if event.track %span.track %span.fa.fa-road - %span.label{ style: "background-color: #{event.track.color}" } + %span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" } = event.track.name