This commit is contained in:
Bernard Xie 2023-02-27 19:55:37 -08:00
parent 349fac7193
commit 479127b3c6
No known key found for this signature in database
GPG key ID: 3C3E0036CE0F892C

View file

@ -44,14 +44,14 @@ func (g *GoFPDF) GetFillRGB(themeID int64, fill string) (color.RGB, error) {
}, nil
}
rgb := color.Name2RGB(fill)
if (rgb != color.RGB{}) {
return rgb, nil
}
if color.IsThemeColor(fill) {
theme := d2themescatalog.Find(themeID)
fill = d2themes.ResolveThemeColor(theme, fill)
} else {
rgb := color.Name2RGB(fill)
if (rgb != color.RGB{}) {
return rgb, nil
}
}
return color.Hex2RGB(fill)