add else
This commit is contained in:
parent
349fac7193
commit
479127b3c6
1 changed files with 5 additions and 5 deletions
|
|
@ -44,14 +44,14 @@ func (g *GoFPDF) GetFillRGB(themeID int64, fill string) (color.RGB, error) {
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
rgb := color.Name2RGB(fill)
|
|
||||||
if (rgb != color.RGB{}) {
|
|
||||||
return rgb, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if color.IsThemeColor(fill) {
|
if color.IsThemeColor(fill) {
|
||||||
theme := d2themescatalog.Find(themeID)
|
theme := d2themescatalog.Find(themeID)
|
||||||
fill = d2themes.ResolveThemeColor(theme, fill)
|
fill = d2themes.ResolveThemeColor(theme, fill)
|
||||||
|
} else {
|
||||||
|
rgb := color.Name2RGB(fill)
|
||||||
|
if (rgb != color.RGB{}) {
|
||||||
|
return rgb, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return color.Hex2RGB(fill)
|
return color.Hex2RGB(fill)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue