commit dd9584fb758549a0ee0a8a29fc9c265239453294
parent 685d2a1a9904be35fdd865fd2808993daa149633
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date: Fri, 17 Apr 2020 12:04:51 -0700
Implement slide color setting.
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Songs2Slides.py b/Songs2Slides.py
@@ -87,6 +87,10 @@ def CreatePptx(parsedLyrics, filepath, openFirst, settings):
# Add slide
slide = prs.slides.add_slide(blank_slide_layout)
+ # Apply slide formating
+ slide.background.fill.solid()
+ slide.background.fill.fore_color.rgb = RGBColor(settings["slide-color"][0], settings["slide-color"][1], settings["slide-color"][2])
+
# Add text box
txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame
diff --git a/settings.json b/settings.json
@@ -4,6 +4,7 @@
"slide-width": 13.333,
"slide-height": 7.5,
+ "slide-color": [0, 0, 0],
"margin-left": 0.5,
"margin-right": 0.5,
@@ -14,7 +15,7 @@
"font-size": 40,
"font-bold": false,
"font-italic": false,
- "font-color": [0, 0, 0],
+ "font-color": [255, 255, 255],
"vertical-alignment": "middle",
"line-spacing": 1.25,