How to Solve NameError: name 'RGBColor' is not defined -- docx
Solution: Import the 'RGBColor' module
To Solve the error, add the following line to the top of your code.
from docx.shared import RGBColor
For more information:
Python docx RGBColor