Paper Office
paper-pptxAPI referencedml.color

ColorFormat

paper-pptx 0.2.0 API reference

Provides access to color settings such as RGB color, theme color, and luminance adjustments.

ColorFormat(eg_colorChoice_parent, color)

Attributes

brightness

attributebrightness

Read/write float value between -1.0 and 1.0 indicating the brightness adjustment for this color, e.g. -0.25 is 25% darker and 0.4 is 40% lighter. 0 means no brightness adjustment.

rgb

attributergb

RGBColor value of this color, or None if no RGB color is explicitly defined for this font. Setting this value to an RGBColor instance causes its type to change to MSO_COLOR_TYPE.RGB. If the color was a theme color with a brightness adjustment, the brightness adjustment is removed when changing it to an RGB color.

theme_color

attributetheme_color

Theme color value of this color.

Value is a member of :ref:MsoThemeColorIndex, e.g. MSO_THEME_COLOR.ACCENT_1. Raises AttributeError on access if the color is not type MSO_COLOR_TYPE.SCHEME. Assigning a member of :ref:MsoThemeColorIndex causes the color's type to change to MSO_COLOR_TYPE.SCHEME.

type

attributetype

Read-only. A value from :ref:MsoColorType, either RGB or SCHEME, corresponding to the way this color is defined, or None if no color is defined at the level of this font.

Functions

from_colorchoice_parent

funcfrom_colorchoice_parent(eg_colorChoice_parent)
parameg_colorChoice_parent

On this page