forked from scanny/python-pptx
-
Notifications
You must be signed in to change notification settings - Fork 0
[Epic] Transparency & Opacity (Fills, Lines, Pictures) #17
Copy link
Copy link
Closed
Labels
area:shapesFeature area: shapesFeature area: shapesepicMulti-feature roadmap epicMulti-feature roadmap epicprior-art:forkActive community fork has shipped thisActive community fork has shipped thisprior-art:upstream-prOpen PR on scanny/python-pptx is candidate cherry-pickOpen PR on scanny/python-pptx is candidate cherry-pickpriority:P0Highest user demand or strategic valueHighest user demand or strategic valuestatus:quick-winHigh user demand, small implementationHigh user demand, small implementation
Milestone
Metadata
Metadata
Assignees
Labels
area:shapesFeature area: shapesFeature area: shapesepicMulti-feature roadmap epicMulti-feature roadmap epicprior-art:forkActive community fork has shipped thisActive community fork has shipped thisprior-art:upstream-prOpen PR on scanny/python-pptx is candidate cherry-pickOpen PR on scanny/python-pptx is candidate cherry-pickpriority:P0Highest user demand or strategic valueHighest user demand or strategic valuestatus:quick-winHigh user demand, small implementationHigh user demand, small implementation
Problem
Transparency / opacity is the cleanest single-PR cherry-pick available in the upstream queue. Every fill format (
<a:solidFill>,<a:gradFill>,<a:blipFill>,<a:pattFill>) and every color format can carry an<a:alpha val=>child to express opacity from 0–100k (per-mille). Today python-pptx exposes no publictransparencysetter onFillFormatorColorFormat, so the only way to author a 50%-transparent shape is to splice<a:alpha>into the XML by hand. There has been an open transparency PR since 2014 (scanny/python-pptx#140,FillFormat.transparency) and the most recent and complete implementation is scanny/python-pptx#1090 (spandan-k, 2025-09-11, 517/-1 LOC, updated April 2026 — author still responsive). This PR is the highest-leverage low-effort cherry-pick in the entire roadmap.Sub-features
FillFormat.transparency = 0.5(range 0.0–1.0) emits<a:alpha val=50000/>inside the active fill childColorFormat.transparencysetter on the underlying<a:srgbClr>/<a:schemeClr>_SolidFill.transparencygetter+setter_GradientFill.gradient_stops[i].transparencyfor per-stop alpha_BlipFill.transparency(overlaps with Pictures epic; coordinate to avoid duplication)_PatternFill.transparency<a:alpha>elements in unrelated read pathsLineFormat.transparencyfor line opacity (<a:ln>carries<a:solidFill>with<a:alpha>)Prior art
dml alpha. scanny/python-pptx#353 chart-fill transparency (asakharov, 2018).secondlayerco/python-pptx— opacity support acrossdml/color.py+dml/fill.py+ transparency oxml (Napkin AI's branded napkin branch).<a:alpha val=>(range 0–100000 per-mille), §20.1.4.1.32<a:alphaMod>, §20.1.8.10<a:alphaModFix>, §20.1.8.1<a:alphaInv>.src/pptx/dml/fill.py,src/pptx/dml/color.py,src/pptx/dml/line.py,src/pptx/oxml/dml/fill.py.Acceptance criteria
shape.fill.solid(); shape.fill.fore_color.transparency = 0.5produces a half-transparent fill in PowerPoint.Effort: S
Single-PR cherry-pick (scanny#1090) carries most of the work; remaining is integration, behave coverage, and
_BlipFillcoordination with the Pictures epic.Labels
status:quick-win— high user demand, small implementation. Recommended as the FIRST epic to ship after this roadmap is filed.