How do I change the colors of redactions, using python?

Q:

I am having hard time time changing my redactions to black in Python. For some reason the Redaction instance does not seem to have a SetColor method (and python seems to be looking for it as an attribute?)

A:

You can change the appearance of a redaction with an Appearance object. (The C/C++ API documentation gives an idea of what it provides: http://www.pdftron.com/pdfnet/PDFNetC/d5/d7a/classpdftron_1_1_p_d_f_1_1_redactor_1_1_appearance.html).

For example, the following code gives red text on a black background:

app = Appearance()
app.TextColor = ColorPt(1, 0, 0)
app.PositiveOverlayColor = ColorPt(0, 0, 0)
Redactor.Redact(doc, vec, app)