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

Method gradient

src/pptx/dml/fill.py:73–84  ·  view source on GitHub ↗

Sets the fill type to gradient. If the fill is not already a gradient, a default gradient is added. The default gradient corresponds to the default in the built-in PowerPoint "White" template. This gradient is linear at angle 90-degrees (upward), with two stops. The

(self)

Source from the content-addressed store, hash-verified

71 return self._fill.fore_color
72
73 def gradient(self):
74 """Sets the fill type to gradient.
75
76 If the fill is not already a gradient, a default gradient is added.
77 The default gradient corresponds to the default in the built-in
78 PowerPoint "White" template. This gradient is linear at angle
79 90-degrees (upward), with two stops. The first stop is Accent-1 with
80 tint 100%, shade 100%, and satMod 130%. The second stop is Accent-1
81 with tint 50%, shade 100%, and satMod 350%.
82 """
83 gradFill = self._xPr.get_or_change_to_gradFill()
84 self._fill = _GradFill(gradFill)
85
86 @property
87 def gradient_angle(self):

Calls 1

_GradFillClass · 0.85

Tested by 1