Theming API Reference¶
Reference for theme management and customization.
Theme Class¶
The Theme class represents a presentation theme.
from slidegen.theming import Theme
# Default theme
theme = Theme.default()
# Load from template
theme = load_theme(theme_path="template.pptx")
# Load by name
theme = load_theme(theme_name="corporate")
load_theme()¶
Load a theme from a template file or by name.
from slidegen.theming import load_theme
theme = load_theme(theme_path: Optional[str] = None, theme_name: Optional[str] = None)
Parameters:
theme_path(Optional[str]): Path to PowerPoint template file (.pptx)theme_name(Optional[str]): Built-in theme name
Returns:
Theme: Theme object
Example:
# Load from template
theme = load_theme(theme_path="templates/corporate.pptx")
# Load built-in theme
theme = load_theme(theme_name="corporate")
Theme Methods¶
get_background_rgb() -> Optional[RGBColor]¶
Get background color as RGB color object.
get_text_color() -> Optional[RGBColor]¶
Get text color as RGB color object.
Built-in Themes¶
Default Theme¶
Professional default appearance with standard colors and fonts.
Corporate Theme¶
Business-appropriate color scheme and styling.
Dark Theme¶
Dark color scheme for modern presentations.
Using Themes with SlideGenerator¶
from slidegen import SlideGenerator
# Built-in theme
gen = SlideGenerator(theme_name="corporate")
# Custom template
gen = SlideGenerator(theme="templates/custom.pptx")
See Also¶
- Core API - SlideGenerator theming
- User Guide: Theming - Theming guide