MCPcopy Create free account
hub / github.com/scanny/python-pptx / color

Method color

src/pptx/dml/line.py:22–33  ·  view source on GitHub ↗

The |ColorFormat| instance that provides access to the color settings for this line. Essentially a shortcut for ``line.fill.fore_color``. As a side-effect, accessing this property causes the line fill type to be set to ``MSO_FILL.SOLID``. If this sounds risky for you

(self)

Source from the content-addressed store, hash-verified

20
21 @lazyproperty
22 def color(self):
23 """
24 The |ColorFormat| instance that provides access to the color settings
25 for this line. Essentially a shortcut for ``line.fill.fore_color``.
26 As a side-effect, accessing this property causes the line fill type
27 to be set to ``MSO_FILL.SOLID``. If this sounds risky for your use
28 case, use ``line.fill.type`` to non-destructively discover the
29 existing fill type.
30 """
31 if self.fill.type != MSO_FILL.SOLID:
32 self.fill.solid()
33 return self.fill.fore_color
34
35 @property
36 def dash_style(self):

Callers

nothing calls this directly

Calls 1

solidMethod · 0.80

Tested by

no test coverage detected