Home/ Reference/ Application

app.CreateRGBColor(r, g, b)

Builds an RGB color object you can pass to Fill.ApplyUniformFill(color).

Signature

app.CreateRGBColor(r, g, b)

Notes

Builds an RGB color object you can pass to Fill.ApplyUniformFill(color).

Python example (runnable)

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

blue = app.CreateRGBColor(0, 133, 205)     # build an RGB colour object
shape.Fill.ApplyUniformFill(blue)          # fill with that blue in one call

print("Filled with RGB(0,133,205)")

About this section: Application

Application — the CorelDRAW application object.

Other entries in this section