theme
theme
¶
Custom element classes for the theme part, word/theme/theme1.xml.
Only the two subtrees that a word-processing document actually resolves against are
modelled: a:fontScheme, which is where a theme typeface such as minorHAnsi turns
into a real font name, and a:clrScheme, which is where a theme colour turns into an
RGB value. a:fmtScheme — the fill, line and effect matrices — is a drawing-formatting
model of its own and is left as opaque XML.
CT_TextFont
¶
CT_FontCollection
¶
Bases: BaseOxmlElement
a:majorFont or a:minorFont, the typefaces of one half of the font scheme.
a:latin is the one a w:rFonts/@w:asciiTheme of majorHAnsi or minorHAnsi
resolves to; a:ea and a:cs serve the East Asian and complex-script slots.
typeface_for
¶
The typeface for script, one of "latin", "ea" or "cs".
None when the slot carries the empty typeface Word writes to mean "no
override", which is what a:ea and a:cs hold in the default Office theme.
Source code in src/docx/oxml/theme.py
CT_FontScheme
¶
CT_SRgbColor
¶
CT_SystemColor
¶
Bases: BaseOxmlElement
a:sysClr, a colour taken from the operating system's palette.
@lastClr is the RGB value the producing application last resolved it to, which is
the only concrete value available to a consumer that is not the operating system in
question.
CT_ThemeColor
¶
Bases: BaseOxmlElement
One slot of a:clrScheme, e.g. a:accent1.
The colour itself is one of several child element types; only the two Word writes for a theme are modelled.
CT_ColorScheme
¶
Bases: BaseOxmlElement
a:clrScheme, the twelve theme colours.
color
¶
color(slot: str) -> CT_ThemeColor | None
The a:{slot} child, or None when the scheme does not define it.