Skip to content

Commit

Permalink
label: adjust forecolor boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Aug 27, 2016
1 parent ce1e434 commit 13c106a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion models/issue_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (l *Label) ForegroundColor() template.CSS {
b := float32(0xFF & color)
luminance := (0.2126*r + 0.7152*g + 0.0722*b) / 255

if luminance < 0.5 {
if luminance < 0.66 {
return template.CSS("#fff")
}
}
Expand Down
7 changes: 0 additions & 7 deletions modules/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ func NewFuncMap() []template.FuncMap {
return t.Format("Jan 02, 2006")
},
"List": List,
"Mail2Domain": func(mail string) string {
if !strings.Contains(mail, "@") {
return "try.gogs.io"
}

return strings.SplitN(mail, "@", 2)[1]
},
"SubStr": func(str string, start, length int) string {
if len(str) == 0 {
return ""
Expand Down

0 comments on commit 13c106a

Please sign in to comment.