summaryrefslogtreecommitdiff
path: root/shape.go
diff options
context:
space:
mode:
Diffstat (limited to 'shape.go')
-rw-r--r--shape.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/shape.go b/shape.go
index e6a2ff3..f284e43 100644
--- a/shape.go
+++ b/shape.go
@@ -411,11 +411,6 @@ func (f *File) addDrawingShape(sheet, drawingXML, cell string, formatSet *format
U: u,
Sz: p.Font.Size * 100,
Latin: &aLatin{Typeface: p.Font.Family},
- SolidFill: &aSolidFill{
- SrgbClr: &attrValString{
- Val: strings.Replace(strings.ToUpper(p.Font.Color), "#", "", -1),
- },
- },
},
T: text,
},
@@ -423,6 +418,14 @@ func (f *File) addDrawingShape(sheet, drawingXML, cell string, formatSet *format
Lang: "en-US",
},
}
+ srgbClr := strings.Replace(strings.ToUpper(p.Font.Color), "#", "", -1)
+ if len(srgbClr) == 6 {
+ paragraph.R.RPr.SolidFill = &aSolidFill{
+ SrgbClr: &attrValString{
+ Val: srgbClr,
+ },
+ }
+ }
shape.TxBody.P = append(shape.TxBody.P, paragraph)
}
twoCellAnchor.Sp = &shape