I was also attempting to grab the scheme color value as the following:
from pptx.opc.constants import RELATIONSHIP_TYPE as RT
from pptx.oxml import parse_xml
slide_master = slide.slide_layout.slide_master
slide_master_part = slide_master.part
theme_part = slide_master_part.part_related_by(RT.THEME)
theme = parse_xml(theme_part.blob) # theme here is an <a:theme> element
srgbClr = theme.xpath('a:themeElements/a:clrScheme/a:accent1/a:srgbClr/@val')[0]
print(srgbClr)
Originally posted by @scanny in #308 (comment)
However, I noticed an anomaly of mismatching between the actual scheme color index (from loaded .pptx) and the child tagname of <a:clrScheme>.
For example,
FillFormat.fore_color.theme_color return BACKGROUND_1
meanwhile the xml actually stored the color value under <a:lt1> which actually corresponds to LIGHT_1.
I was also attempting to grab the scheme color value as the following:
Originally posted by @scanny in #308 (comment)
However, I noticed an anomaly of mismatching between the actual scheme color index (from loaded
.pptx) and the child tagname of<a:clrScheme>.For example,
FillFormat.fore_color.theme_colorreturnBACKGROUND_1meanwhile the xml actually stored the color value under
<a:lt1>which actually corresponds toLIGHT_1.