diff options
author | GaoFei <strivek@icloud.com> | 2022-10-15 00:03:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 00:03:49 +0800 |
commit | 3ece904b0082f4d63afe0d795b61c860d0790c83 (patch) | |
tree | cd747622903878bb6bb4828f56c97cf3c5da76a9 /cell.go | |
parent | 3d02726ad4dc3bc6a92d5b68ef8421ac4db44076 (diff) |
This closes #1369, support set, and get font color with theme and tint (#1370)
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -823,6 +823,10 @@ func getCellRichText(si *xlsxSI) (runs []RichTextRun) { font.Strike = v.RPr.Strike != nil if v.RPr.Color != nil { font.Color = strings.TrimPrefix(v.RPr.Color.RGB, "FF") + if v.RPr.Color.Theme != nil { + font.ColorTheme = v.RPr.Color.Theme + } + font.ColorTint = v.RPr.Color.Tint } run.Font = &font } @@ -879,9 +883,7 @@ func newRpr(fnt *Font) *xlsxRPr { if fnt.Size > 0 { rpr.Sz = &attrValFloat{Val: &fnt.Size} } - if fnt.Color != "" { - rpr.Color = &xlsxColor{RGB: getPaletteColor(fnt.Color)} - } + rpr.Color = newFontColor(fnt) return &rpr } |