Skip to content

Upstream Bug - Accessing Color on Text Run causes unintentional side effects #15

@darylteo

Description

@darylteo

scanny/python-pptx#1074

Comment out these lines if encountering this issue

        # saved['color.type'] = font.color.type
        # if font.color.type == MSO_COLOR_TYPE.SCHEME:
        #     saved['color.brightness'] = font.color.brightness
        #     saved['color.theme_color'] = font.color.theme_color
        # elif font.color.type == MSO_COLOR_TYPE.RGB:
        #     saved['color.rgb'] = None if font.color.rgb is None else str(font.color.rgb)
        # saved['fill'] = font.fill
        # saved['language_id'] = font.language_id
        # if saved['color.type'] == MSO_COLOR_TYPE.SCHEME:
        #     font.color.brightness = saved['color.brightness']
        #     font.color.theme_color = saved['color.theme_color']
        # elif saved['color.type'] == MSO_COLOR_TYPE.RGB:
        #     if saved['color.rgb'] is not None:
        #         font.color.rgb = RGBColor.from_string(saved['color.rgb'])
        #     else:
        #         font.color.rgb = None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions