Paper Office
paper-pptxAPI referenceenum.dml

MSO_THEME_COLOR_INDEX

paper-pptx 0.2.0 API reference

An Office theme color, one of those shown in the color gallery on the formatting ribbon.

Alias: MSO_THEME_COLOR

Example::

from pptx.enum.dml import MSO_THEME_COLOR

shape.fill.solid() shape.fill.fore_color.theme_color = MSO_THEME_COLOR.ACCENT_1

MS API Name: MsoThemeColorIndex

http://msdn.microsoft.com/en-us/library/office/ff860782(v=office.15).aspx

Attributes

ACCENT_1

attributeACCENT_1
= (5, 'accent1', 'Specifies the Accent 1 theme color.')

Specifies the Accent 1 theme color.

ACCENT_2

attributeACCENT_2
= (6, 'accent2', 'Specifies the Accent 2 theme color.')

Specifies the Accent 2 theme color.

ACCENT_3

attributeACCENT_3
= (7, 'accent3', 'Specifies the Accent 3 theme color.')

Specifies the Accent 3 theme color.

ACCENT_4

attributeACCENT_4
= (8, 'accent4', 'Specifies the Accent 4 theme color.')

Specifies the Accent 4 theme color.

ACCENT_5

attributeACCENT_5
= (9, 'accent5', 'Specifies the Accent 5 theme color.')

Specifies the Accent 5 theme color.

ACCENT_6

attributeACCENT_6
= (10, 'accent6', 'Specifies the Accent 6 theme color.')

Specifies the Accent 6 theme color.

BACKGROUND_1

attributeBACKGROUND_1
= (14, 'bg1', 'Specifies the Background 1 theme color.')

Specifies the Background 1 theme color.

BACKGROUND_2

attributeBACKGROUND_2
= (16, 'bg2', 'Specifies the Background 2 theme color.')

Specifies the Background 2 theme color.

DARK_1

attributeDARK_1
= (1, 'dk1', 'Specifies the Dark 1 theme color.')

Specifies the Dark 1 theme color.

DARK_2

attributeDARK_2
= (3, 'dk2', 'Specifies the Dark 2 theme color.')

Specifies the Dark 2 theme color.

attributeFOLLOWED_HYPERLINK
= (12, 'folHlink', 'Specifies the theme color for a clicked hyperlink.')

Specifies the theme color for a clicked hyperlink.

attributeHYPERLINK
= (11, 'hlink', 'Specifies the theme color for a hyperlink.')

Specifies the theme color for a hyperlink.

LIGHT_1

attributeLIGHT_1
= (2, 'lt1', 'Specifies the Light 1 theme color.')

Specifies the Light 1 theme color.

LIGHT_2

attributeLIGHT_2
= (4, 'lt2', 'Specifies the Light 2 theme color.')

Specifies the Light 2 theme color.

MIXED

attributeMIXED
= (-2, '', 'Indicates multiple theme colors are used, such as in a group shape (read-only).')

Indicates multiple theme colors are used, such as in a group shape (read-only).

NOT_THEME_COLOR

attributeNOT_THEME_COLOR
= (0, '', 'Indicates the color is not a theme color.')

Indicates the color is not a theme color.

TEXT_1

attributeTEXT_1
= (13, 'tx1', 'Specifies the Text 1 theme color.')

Specifies the Text 1 theme color.

TEXT_2

attributeTEXT_2
= (15, 'tx2', 'Specifies the Text 2 theme color.')

Specifies the Text 2 theme color.

xml_value

attributexml_valuestr | None

Functions

from_xml

funcfrom_xml(xml_value: str) -> Self

Enumeration member corresponding to XML attribute value xml_value.

Raises ValueError if xml_value is the empty string ("") or is not an XML attribute value registered on the enumeration. Note that enum members that do not correspond to one of the defined values for an XML attribute have xml_value == "". These "return-value only" members cannot be automatically mapped from an XML attribute value and must be selected explicitly by code, based on the appropriate conditions.

Example::

WD_PARAGRAPH_ALIGNMENT.from_xml("center") WD_PARAGRAPH_ALIGNMENT.CENTER

paramxml_valuestr

Returns

typing_extensions.Self

to_xml

functo_xml(value: int | _T) -> str

XML value of this enum member, generally an XML attribute value.

paramvalueint | _T

Returns

str

validate

funcvalidate(value: _T)

Raise ValueError if value is not an assignable value.

paramvalue_T

On this page