Merge pull request #1672 from Juneezee/master
lib/color: avoid unnecessary byte/string conversion
This commit is contained in:
commit
0e8fa7cd8f
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ import (
|
||||||
var themeColorRegex = regexp.MustCompile(`^(N[1-7]|B[1-6]|AA[245]|AB[45])$`)
|
var themeColorRegex = regexp.MustCompile(`^(N[1-7]|B[1-6]|AA[245]|AB[45])$`)
|
||||||
|
|
||||||
func IsThemeColor(colorString string) bool {
|
func IsThemeColor(colorString string) bool {
|
||||||
return themeColorRegex.Match([]byte(colorString))
|
return themeColorRegex.MatchString(colorString)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Darken(colorString string) (string, error) {
|
func Darken(colorString string) (string, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue