Browse Source

label: adjust forecolor boundary

tags/v1.2.0-rc1
Unknwon 9 years ago
parent
commit
b8e94170b3
2 changed files with 1 additions and 8 deletions
  1. +1
    -1
      models/issue_label.go
  2. +0
    -7
      modules/template/template.go

+ 1
- 1
models/issue_label.go View File

@@ -52,7 +52,7 @@ func (l *Label) ForegroundColor() template.CSS {
b := float32(0xFF & color) b := float32(0xFF & color)
luminance := (0.2126*r + 0.7152*g + 0.0722*b) / 255 luminance := (0.2126*r + 0.7152*g + 0.0722*b) / 255


if luminance < 0.5 {
if luminance < 0.66 {
return template.CSS("#fff") return template.CSS("#fff")
} }
} }


+ 0
- 7
modules/template/template.go View File

@@ -73,13 +73,6 @@ func NewFuncMap() []template.FuncMap {
return t.Format("Jan 02, 2006") return t.Format("Jan 02, 2006")
}, },
"List": List, "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 { "SubStr": func(str string, start, length int) string {
if len(str) == 0 { if len(str) == 0 {
return "" return ""


Loading…
Cancel
Save