Fix label text color

This commit is contained in:
Naoki Takezoe
2014-10-05 20:01:34 +09:00
parent b1017140aa
commit 70f0ffd4f4
2 changed files with 4 additions and 4 deletions

View File

@@ -29,9 +29,9 @@ case class Label(
val b = color.substring(4, 6)
if(Integer.parseInt(r, 16) + Integer.parseInt(g, 16) + Integer.parseInt(b, 16) > 408){
"black"
"000000"
} else {
"white"
"ffffff"
}
}
}

View File

@@ -10,8 +10,8 @@
<div class="span8">
<div style="margin-top: 6px">
<a href="@url(repository)/issues?labels=@urlEncode(label.labelName)" id="label-row-content-@label.labelId">
<span style="background-color: #@label.color; color: @label.fontColor; padding: 8px; font-size: 120%; border-radius: 4px;">
<img src="@assets/common/images/label_@(label.fontColor).png" style="width: 12px;"/>
<span style="background-color: #@label.color; color: #@label.fontColor; padding: 8px; font-size: 120%; border-radius: 4px;">
<img src="@assets/common/images/label_@(if(label.fontColor == "ffffff") "white" else "black").png" style="width: 12px;"/>
@label.labelName
</span>
</a>