From 13c106af7764a0b4757348ab4c82dbf9154ee11c Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 27 Aug 2016 12:44:39 -0700 Subject: [PATCH] label: adjust forecolor boundary --- models/issue_label.go | 2 +- modules/template/template.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/models/issue_label.go b/models/issue_label.go index 62d687a262..f70732f6c8 100644 --- a/models/issue_label.go +++ b/models/issue_label.go @@ -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") } } diff --git a/modules/template/template.go b/modules/template/template.go index c05335f2e6..433c412787 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -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 ""