Open ProgrammerMatt opened 5 years ago
@ProgrammerMatt the page you linked to is a design document, which in this case has not yet been fully implemented. You can see the same operation at work in the python-pptx
package here:
https://github.com/scanny/python-pptx/blob/master/pptx/dml/color.py#L35 .
and in more detail here:
https://github.com/scanny/python-pptx/blob/master/pptx/dml/color.py#L130:L152 .
if you want to take a crack at adding it locally for your own use.
the documentation suggests I should be able to increase or decrease brightness of font when using a theme color:
https://python-docx.readthedocs.io/en/latest/dev/analysis/features/text/font-color.html?highlight=brightness
here is the code in question: obj_charstyle2 = obj_styles.add_style('AddressStyle', WD_STYLE_TYPE.CHARACTER) obj_font2 = obj_charstyle2.font obj_font2.size = Pt(10) obj_font2.name = 'Lucida Calligraphy' obj_font2.color.theme_color = MSO_THEME_COLOR.ACCENT_6 obj_font2.color.brightness = -0.5