0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 09:24:20 +01:00

label: adjust forecolor boundary

This commit is contained in:
Unknwon 2016-08-27 12:44:39 -07:00
parent ce1e4348da
commit 13c106af77
2 changed files with 1 additions and 8 deletions

View file

@ -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")
}
}

View file

@ -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 ""