Home/ Reference/ Shape Appearance

shape.Fill

The fill object. See the Fill section.

Signature

shape.Fill

Notes

The fill object. See the Fill section.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)

print("Fill type: ", shape.Fill.Type)       # 0=none 1=uniform 2=fountain...

if shape.Fill.Type == 1:                   # only a uniform fill exposes UniformColor
    print("Colour: ", shape.Fill.UniformColor.HexValue)

About this section: Shape Appearance

Shape Appearance — outline, fill and transparency shortcuts.

Other entries in this section