Overview
Takes a 292-slide master PowerPoint and rebuilds it per retail partner: swapping logos, remapping brand colors in LAB color space, and replacing text tokens. One execution, 51 Brainshark-ready output files per partner.
The Problem
The client produces training materials for multiple retail partners, each requiring:
- Custom branding (logos, colors, partner names)
- Consistent quality across all materials
- Rapid turnaround for partner requests
- Multiple output formats (slides, Brainshark modules)
Manual rebranding was:
- Extremely time-consuming (20+ hours per partner)
- Error-prone (missed slides, inconsistent styling)
- Difficult to scale (new partners = repeat all work)
Solution Architecture
Master PPTX (292 slides)
|
Python Processor
|
┌─────┴─────┐
| | |
Logo Color Text
Replace Match Replace
| | |
└─────┬─────┘
|
51 Output Files
(Brainshark-ready)
Key Features
Dynamic Logo Replacement
Intelligent logo detection and replacement:
- Position-aware placement
- Automatic sizing to match original
- Transparency handling for complex logos
Fuzzy Color Matching
def match_brand_color(source_color: RGB, brand_palette: List[RGB]) -> RGB:
"""Find closest brand color using LAB color space"""
source_lab = rgb_to_lab(source_color)
best_match = min(
brand_palette,
key=lambda c: delta_e(source_lab, rgb_to_lab(c))
)
return best_matchHandles color variations in source files:
- Gradient colors
- Slight color variations
- Theme vs. explicit colors
Text Token Replacement
Partner-specific text replacement:
- Company names
- Contact information
- Custom messaging
- Slide-specific content
Batch Processing
Single execution processes entire presentation:
- 292 slides analyzed
- 51 output files generated
- Full audit log created
Technical Implementation
PPTX Processing
from pptx import Presentation
from pptx.util import Inches, Pt
def process_slide(slide, brand_config):
# Process shapes
for shape in slide.shapes:
if shape.has_text_frame:
replace_text(shape, brand_config.text_map)
if is_logo(shape):
replace_logo(shape, brand_config.logo_path)
if has_fill_color(shape):
remap_color(shape, brand_config.color_map)Image Processing
Pillow for logo manipulation:
- Resize to match original dimensions
- Handle transparency (PNG with alpha)
- Color space conversion when needed
VBA Macro Injection
Brainshark-ready outputs include:
- Navigation macros
- Timing configuration
- Audio sync points
Results
The automation delivers:
- 20+ hours per partner
- Manual checks for missed replacements
- 3 partners supported
- Rebranding repeated for each partner
- Roughly 5-10 minutes per partner
- Audit log for checking replacements
- 7+ partners supported
- Reusable partner configuration
Efficiency Gain
The recorded workflow comparison is 20+ hours of manual rebranding versus roughly 5-10 minutes of automated processing per partner. Processing time describes the generation step, not a measured end-to-end delivery time including review.
Quality Improvement
- Consistent branding across all slides
- Replacement audit log for review
- Audit trail for verification
Sample Output
For each retail partner, the system produces:
- 51 individual PPTX modules
- Named with partner prefix
- Brainshark macro-enabled
- Ready for immediate deployment