summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorGaoFei <strivek@icloud.com>2022-10-15 00:03:49 +0800
committerGitHub <noreply@github.com>2022-10-15 00:03:49 +0800
commit3ece904b0082f4d63afe0d795b61c860d0790c83 (patch)
treecd747622903878bb6bb4828f56c97cf3c5da76a9 /cell.go
parent3d02726ad4dc3bc6a92d5b68ef8421ac4db44076 (diff)
This closes #1369, support set, and get font color with theme and tint (#1370)
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cell.go b/cell.go
index 80eb035..550ca38 100644
--- a/cell.go
+++ b/cell.go
@@ -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
}