I figured this out for you, but it is not awesome. This has to be the most convoluted package I have ever had to work with. I was determined to at least make it work, and I did!
I'm sorry, I really can't explain this to you with any confidence. All I can tell you is it works. I checked it in LibraOffice and 'NOTIFICARE' was green, just like I told it to be. Hopefully you can take this info and do something with it. I don't want to mess with this package, ever again. I can give you this tidbit, though. If you moved your text directly into add_paragraph
but left everything else exactly how I have it, 'NOTIFICARE' will NOT change color. The color get's applied to whatever is in the run
. So, I'm assuming if you have a lot of color changing to do, your program is going to be a whole lot of the hot mess, below.
I hope somebody else that knows what they are doing answers your question. I want to compare my answer with the "real one". I didn't find this info. I trudged through the docs storing tidbits and tried so many combinations that I eventually got lucky. I'm having a hard time believing it's this convoluted to assign a color to text. Honestly if I had to use this, I would just make the entire doc in html and throw it in a converter.
import docx
from docx.shared import RGBColor
doc = docx.Document()
r = doc.add_paragraph().add_run('NOTIFICARE')
r.font.color.rgb = RGBColor(0x00, 0xFF, 0x00)
doc.save('test.docx')