Html Presentation Generator

Other

Generate professional multi-page HTML presentations (PPT). Creates slide decks with cover, TOC, section dividers, content pages, and summary slides. Supports export to PDF/PPTX. TRIGGERS: PPT, 演示文稿, presentation, HTML slides, 幻灯片, slide deck, 汇报, 报告.

Install

openclaw skills install html-presentation-generator

HTML Presentation Generator

Overview

You are an expert at generating complete multi-page HTML presentations. Each slide is a standalone HTML file rendered at 960×540px. You handle the full pipeline: research → color/font selection → outline planning → slide-by-slide generation (with image generation and visual verification) → final deployment. All slides are static HTML suitable for browser viewing and PPTX export.

Workflow

Follow these steps in order for every presentation:

Step 1 — Research (if needed)

If you lack domain knowledge about the user's topic, perform deep research first:

  • Search the web for key facts, data, and context
  • Validate information from multiple sources
  • Organize findings to inform slide content

Step 2 — Choose Color Palette & Font

Select a color palette from the Color Palette Reference section below based on the topic and audience. The font is fixed:

⚠️ MANDATORY FONT: All presentations use Times New Roman for both Chinese and English text. font-family: 'Times New Roman', serif;

Step 3 — Plan the Outline

Using the Slide Page Types section below, create a complete slide outline:

  1. Classify every slide as exactly one of the 5 page types
  2. For content pages, assign a content subtype
  3. Ensure variety in layouts across slides
  4. Typical structure: Cover → TOC → [Section Divider → Content Pages...] → Summary

Step 4 — Generate Slides

Generate each slide as an individual HTML file. Process up to 5 slides concurrently (not more).

For each slide, follow the page-type-specific workflow below. Every slide must:

  1. Be saved as slides/slide-01.html, slides/slide-02.html, etc. (zero-padded two digits)
  2. Store any generated images in slides/imgs/
  3. Use the exact 960×540 .slide-content dimensions
  4. Use Times New Roman font for all text (Chinese and English)
  5. After writing HTML, take a screenshot using get_html_presentation_screenshot and verify with images_understand — check for layout correctness, no text overlaps, no misplaced elements, and page number badge presence (except cover). Fix any issues before moving on.

Step 5 — Deploy

Use the deploy_html_presentation tool to merge all slides and deploy the final presentation.


Slide Page Types

Classify every slide as exactly one of these 5 types. This prevents layout drift and keeps the deck consistent.

Type 1: Cover Page

Use for: Opening slide, tone setting.

Content elements:

  • Main Title (72–120px, bold, commanding — the visual anchor)
  • Subtitle (28–40px, clearly secondary)
  • Supporting text / presenter / date (18–24px, subtle)
  • Meta info (14–18px)
  • Background image or strong visual motif

Font size hierarchy:

ElementSizeNotes
Main Title72–120pxBold, 3–5× base
Subtitle28–40px1.5–2× base
Supporting Text18–24pxBase
Meta Info14–18px0.7–1× base

Layout options:

  1. Asymmetric Left-Right — Text on one side, image on the other
    |  Title & Subtitle  |    Visual/Image    |
    |  Description       |                    |
    
  2. Center-Aligned — Content centered over background image
    |           [Background Image]           |
    |              MAIN TITLE                |
    |              Subtitle                  |
    

Design decisions: Purpose (corporate/creative/educational)? Audience? Tone? Content volume?

Image generation: MANDATORY. You MUST call GenerateImage to create at least one image for the cover. Do NOT proceed to HTML until you have a valid image path.

Workflow:

  1. Analyze topic, audience, purpose
  2. Generate image (MANDATORY) — wait for file path
  3. Choose layout
  4. Write HTML (embed actual image path, never a placeholder)
  5. Screenshot + verify

No page number badge on cover page.


Type 2: Table of Contents

Use for: Navigation, expectation setting (3–5 sections).

Content elements:

  • Page title ("Table of Contents" / "Agenda" / "Overview")
  • Section numbers (01, 02… or I, II…)
  • Section titles
  • Optional one-line descriptions
  • Page number badge (MANDATORY) — see Appendix G

Font size hierarchy:

ElementSize
Page Title36–44px
Section Number28–36px
Section Title20–28px
Description14–16px

Layout options:

  1. Numbered Vertical List — Clean left-aligned structure
    |  TABLE OF CONTENTS            |
    |  01  Section Title One         |
    |  02  Section Title Two         |
    
  2. Two-Column Grid — 2×N grid with numbers + titles
  3. Sidebar Navigation — Colored sidebar with section markers
  4. Card-Based — Section cards in a row/grid

Image generation: OPTIONAL — most TOC slides work best with clean typography + SVG decorations.

Workflow:

  1. Analyze section list and count
  2. Choose layout (3 sections → vertical; 4–6 → grid/compact; 7+ → multi-column)
  3. Plan visual hierarchy
  4. Generate image (optional)
  5. Write HTML with page number badge
  6. Screenshot + verify

Type 3: Section Divider

Use for: Clear transitions between major parts.

Content elements:

  • Section number (72–120px, bold, accent color — the dominant element)
  • Section title (36–48px, bold, primary color)
  • Optional intro text (16–20px, light, muted)
  • SVG accent shapes (bars, lines, geometric blocks)
  • Page number badge (MANDATORY) — see Appendix G

Layout options:

  1. Bold Center — Number + title centered
  2. Left-Aligned with Accent Block — Colored bar on left
  3. Split Background — Two color zones
  4. Full-Bleed Background with Overlay — Strong bg color, semi-transparent number

Design decisions: Corporate → accent block; Creative → full-bleed; Minimal → bold center. Divider style must be consistent across all dividers in one deck.

Image generation: OPTIONAL — most dividers work best with bold typography + solid colors + SVG accents.

Workflow:

  1. Analyze section number, title, intro
  2. Choose layout
  3. Generate image (optional)
  4. Write HTML with page number badge
  5. Screenshot + verify

Type 4: Content Page

Use for: The core information slides. Each content page belongs to exactly ONE subtype.

Content subtypes:

4a. Text

  • Bullets, quotes, short paragraphs
  • Must include icons or SVG shapes — never plain text only
|  SLIDE TITLE                          |
|  • Bullet point one                   |
|  • Bullet point two                   |
|  • Bullet point three                 |

4b. Mixed Media

  • Two-column: image on one side, text on the other
|  SLIDE TITLE                          |
|  Text content     |  [Image/Visual]   |
|  and bullets      |                   |

4c. Data Visualization

  • SVG chart (bar/progress/ring) + 1–3 key takeaways + data source
|  SLIDE TITLE                          |
|  [SVG Chart]      |  Key Takeaway 1   |
|                   |  Key Takeaway 2   |
|                   Source: xxx          |

4d. Comparison

  • Side-by-side columns/cards (A vs B, pros/cons)
|  SLIDE TITLE                          |
|  ┌─ Option A ─┐  ┌─ Option B ─┐      |
|  │  Detail 1  │  │  Detail 1  │      |
|  └────────────┘  └────────────┘      |

4e. Timeline / Process

  • Steps with arrows, numbered connectors
|  SLIDE TITLE                          |
|  [1] ──→ [2] ──→ [3] ──→ [4]         |
|  Step    Step    Step    Step          |

4f. Image Showcase

  • Hero image as primary element, text supporting
|  SLIDE TITLE                          |
|  ┌────────────────────────────────┐   |
|  │         [Hero Image]           │   |
|  └────────────────────────────────┘   |
|  Caption or supporting text           |

Font size hierarchy:

ElementSizeNotes
Slide Title36–44pxBold, top of slide
Section Header20–24pxBold, sub-sections
Body Text14–16pxRegular weight, LEFT-ALIGNED
Captions / Source10–12pxMuted color
Stat Callout60–72pxLarge bold numbers

Content elements (all content pages):

  1. Slide Title — always required, top of slide
  2. Body Content — based on subtype
  3. Visual Element — image, chart, icon, or SVG shape — ALWAYS required
  4. Source / Caption — include when showing data
  5. Page number badge (MANDATORY) — see Appendix G

Key principles:

  • Left-align body text — never center paragraphs or bullet lists
  • Title must be 36pt+ for contrast with 14–16pt body
  • 0.5″ minimum margins, 0.3–0.5″ between content blocks
  • Each content slide should use a different layout from the previous one

Image generation: MANDATORY. Call GenerateImage for every content page:

  • Mixed Media / Image Showcase → hero image
  • Text / Data / Comparison / Timeline → supporting illustration or thematic element

Workflow:

  1. Analyze content, determine subtype
  2. Generate image (MANDATORY) — wait for file path
  3. Choose layout variant for the subtype
  4. Write HTML with page number badge
  5. Screenshot + verify (layout matches subtype, no overlaps, badge present)

Type 5: Summary / Closing Page

Use for: Wrap-up, action items, thank-you.

Content elements:

  • Closing title (48–72px, bold)
  • Takeaway points (18–24px, scannable)
  • Call to action / next steps
  • Contact info (14–16px, muted)
  • Page number badge (MANDATORY) — see Appendix G

Layout options:

  1. Key Takeaways — 3–5 points with icons/check marks
  2. CTA / Next Steps — Action items + contact info
  3. Thank You / Contact — Centered thank-you + contact details
  4. Split Recap — Left: takeaways; Right: CTA/contact

Image generation: OPTIONAL — most summary slides work best with clean typography + SVG accents.

Workflow:

  1. Analyze closing content type
  2. Choose layout
  3. Generate image (optional)
  4. Write HTML with page number badge
  5. Screenshot + verify

Color Palette Reference

Select ONE palette for the entire presentation based on topic and audience.

#名称色值风格适用场景建议
1现代与健康#006d77 #83c5be #edf6f9 #ffddd2 #e29578清新、治愈医疗健康、心理咨询、护肤品、瑜伽Spa深青做标题,浅粉做背景
2商务与权威#2b2d42 #8d99ae #edf2f4 #ef233c #d90429严谨、经典年度汇报、金融分析、企业介绍、政务报告深蓝显专业,亮红强调数据
3自然与户外#606c38 #283618 #fefae0 #dda15e #bc6c25沉稳、大地色户外用品、环境保护、农业项目、历史文化深绿为底,米色为字
4复古与学院#780000 #c1121f #fdf0d5 #003049 #669bbc经典、书卷气学术讲座、历史回顾、博物馆、复古品牌深红与深蓝对比强烈
5柔美与创意#cdb4db #ffc8dd #ffafcc #bde0fe #a2d2ff梦幻、糖果色母婴产品、甜品店、女性时尚、幼儿园文字用深灰或黑色
6波西米亚#ccd5ae #e9edc9 #fefae0 #faedcd #d4a373温柔、低饱和婚礼策划、家居软装、有机食品、慢生活米色背景,绿棕点缀
7活力与科技#8ecae6 #219ebc #023047 #ffb703 #fb8500高能量、运动体育赛事、健身房、创业路演、少儿教育深蓝稳重心,橙色做焦点
8匠心与手作#7f5539 #a68a64 #ede0d4 #656d4a #414833质朴、咖啡调咖啡店、手工艺品、传统文化、烘焙教学适合纸质/皮革质感
9科技与夜景#000814 #001d3d #003566 #ffc300 #ffd60a深邃、高亮科技发布会、星空天文、夜间经济、高端汽车必须用深色模式
10教育与图表#264653 #2a9d8f #e9c46a #f4a261 #e76f51清晰、逻辑强统计报告、教育培训、市场分析、通用商务完美的图表配色
11森林与环保#dad7cd #a3b18a #588157 #3a5a40 #344e41单色渐变、森系园林设计、ESG报告、环保公益、植物研究单色系安全不会乱
12优雅与时尚#edafb8 #f7e1d7 #dedbd2 #b0c4b1 #4a5759低饱和、莫兰迪高定服装、艺术画廊、美妆品牌、杂志风留白是关键
13艺术与美食#335c67 #fff3b0 #e09f3e #9e2a2b #540b0e浓郁、复古画报美食纪录片、艺术展、民族风情、复古餐厅适合大色块拼接
14轻奢与神秘#22223b #4a4e69 #9a8c98 #c9ada7 #f2e9e4冷艳、紫调珠宝展示、酒店管理、高端咨询、心理学紫色营造高端氛围
15纯净科技蓝#03045e #0077b6 #00b4d8 #90e0ef #caf0f8未来感、纯净云计算/AI、水利海洋、医院医疗、洁净能源从深海到天空的渐变
16海岸珊瑚#0081a7 #00afb9 #fdfcdc #fed9b7 #f07167清爽、夏日感旅游度假、夏季活动、饮品品牌、海洋主题青色与珊瑚色互补亮眼
17活力橙薄荷#ff9f1c #ffbf69 #ffffff #cbf3f0 #2ec4b6明亮、欢快儿童活动、促销海报、快消品、社交媒体橙色吸睛,薄荷绿清爽
18铂金白金#0a0a0a #0070F3 #D4AF37 #f5f5f5 #ffffff高端、专业Agent产品、企业官网、金融科技、高端品牌白金主调,蓝色行动,金色强调

Agent Design System — 完整色板

基于 tokens.css/ts 的 Platinum White-Gold Theme,提供完整色阶供精细设计使用。

White 白色系(背景与浅色表面)

色阶色值用途
white-0#ffffff主背景
white-50#fefefe略带暖调的白
white-75#fcfcfc微灰白
white-100#fafafa次级背景
white-200#f7f7f7卡片背景
white-300#f5f5f5三级背景
white-400#f0f0f0分隔区域
white-500#ebebeb边框浅色
white-600#e5e5e5禁用态背景
white-700#e0e0e0深灰白
white-800#d9d9d9占位符
white-900#d4d4d4分隔线
white-1000#cccccc最深白

Gold 金色系(铂金商务强调色)

色阶色值用途
gold-25#FFFDF5极浅金背景
gold-50#FEF9E7浅金背景
gold-75#FCF3D0淡金高亮
gold-100#FAECB8金色 hover 态
gold-200#F5DC8A亮金强调
gold-300#E8C860金色悬停
gold-400#D4AF37主金色(核心)
gold-500#B8972E金色文字
gold-600#9A7E26深金强调
gold-700#7C651E暗金边框
gold-800#5E4C16深金背景
gold-900#40330F极深金
gold-1000#221A08黑金

Blue 蓝色系(主操作色)

色阶色值用途
blue-25#F0F7FF极浅蓝背景
blue-50#E0EFFF信息提示背景
blue-75#C2DFFF浅蓝高亮
blue-100#A3CFFF禁用态蓝
blue-200#66AFFF亮蓝
blue-300#338FFF蓝色悬停
blue-400#0070F3主蓝色(核心)
blue-500#005FCC蓝色文字
blue-600#004FA6深蓝强调
blue-700#003F80暗蓝边框
blue-800#002F5A深蓝背景
blue-900#001F3D极深蓝
blue-1000#001026黑蓝

Gray 灰色系(文字与中性色)

色阶色值用途
gray-0#ffffff白色
gray-50#fafafa极浅灰
gray-75#f5f5f5浅灰背景
gray-100#ededed分隔线浅
gray-200#d4d4d4边框浅
gray-300#a3a3a3四级文字
gray-400#737373三级文字
gray-500#525252二级文字
gray-600#404040深灰
gray-700#2e2e2e暗色背景
gray-800#1f1f1f深色背景
gray-900#141414极深背景
gray-1000#0a0a0a主文字色(核心)

透明度色值

Opacity Black(黑色透明)

透明度色值用途
0%#0a0a0a00全透明
2%#0a0a0a05微弱遮罩
4%#0a0a0a0a次级交互背景
8%#0a0a0a14边框/分隔
15%#0a0a0a26按压态
20%#0a0a0a33浅遮罩
25%#0a0a0a40中遮罩
50%#0a0a0a80半透明
70%#0a0a0ab2深遮罩
80%#0a0a0acc悬停态
90%#0a0a0ae5tooltip
95%#0a0a0af2弹窗

Opacity White(白色透明)

透明度色值用途
0%#ffffff00全透明
2%#ffffff05微弱遮罩
4%#ffffff0a次级交互背景
8%#ffffff12边框/分隔
15%#ffffff26按压态
20%#ffffff33浅遮罩
25%#ffffff40中遮罩
50%#ffffff80半透明
70%#ffffffb2深遮罩
80%#ffffffcc悬停态
90%#ffffffe5tooltip
95%#fffffff2弹窗

Design Style System

同一套设计可通过调整圆角(radius)和间距(spacing)呈现4种不同风格。根据场景选择合适的风格配方。

风格概览

风格圆角范围间距范围适合场景
Sharp & Compactradius-4 ~ radius-6spacing-4 ~ spacing-12数据密集型后台、表格、IDE、代码编辑器
Soft & Balancedradius-8 ~ radius-12spacing-8 ~ spacing-16企业 SaaS、管理面板、通用 Web App
Rounded & Spaciousradius-16 ~ radius-24spacing-16 ~ spacing-32消费级产品、营销页、社交应用
Pill & Airyradius-32 ~ radius-fullspacing-20 ~ spacing-48移动端 Web、着陆页、品牌展示

Sharp & Compact(锐利紧凑)

视觉特征: 方正、信息密度高、专业严肃感。

类别Token
圆角-小--component-radius-sm4px
圆角-中--component-radius-md4px
圆角-大--component-radius-lg6px
内间距-小--component-padding-sm4px
内间距-中--component-padding-md8px
内间距-大--component-padding-lg12px
间隔-小--component-gap-sm4px
间隔-中--component-gap-md8px
间隔-大--component-gap-lg16px
页面边距--page-margin16px
区块间距--section-gap24px

Soft & Balanced(柔和均衡)

视觉特征: 适中的圆角、舒适的留白、专业又不失亲和。

类别Token
圆角-小--component-radius-sm6px
圆角-中--component-radius-md8px
圆角-大--component-radius-lg12px
内间距-小--component-padding-sm8px
内间距-中--component-padding-md12px
内间距-大--component-padding-lg16px
间隔-小--component-gap-sm6px
间隔-中--component-gap-md12px
间隔-大--component-gap-lg24px
页面边距--page-margin24px
区块间距--section-gap32px

Rounded & Spacious(圆润宽松)

视觉特征: 大圆角、充裕留白、友好亲切、现代消费级感。

类别Token
圆角-小--component-radius-sm10px
圆角-中--component-radius-md16px
圆角-大--component-radius-lg24px
内间距-小--component-padding-sm12px
内间距-中--component-padding-md20px
内间距-大--component-padding-lg32px
间隔-小--component-gap-sm10px
间隔-中--component-gap-md16px
间隔-大--component-gap-lg32px
页面边距--page-margin32px
区块间距--section-gap48px

Pill & Airy(胶囊通透)

视觉特征: 全圆角胶囊形、大量留白、轻盈通透、品牌展示感强。

类别Token
圆角-小--component-radius-sm20px
圆角-中--component-radius-md32px
圆角-大--component-radius-lg999px (full)
内间距-小--component-padding-sm12px
内间距-中--component-padding-md24px
内间距-大--component-padding-lg40px
间隔-小--component-gap-sm12px
间隔-中--component-gap-md24px
间隔-大--component-gap-lg48px
页面边距--page-margin40px
区块间距--section-gap64px

组件级风格映射表

组件SharpSoftRoundedPill
按钮radius-4, padding 8×16radius-6, padding 8×16radius-10, padding 12×20radius-full, padding 12×32
输入框radius-4, padding 8×12radius-6, padding 8×12radius-10, padding 10×16radius-full, padding 10×20
卡片radius-4, padding 8~12radius-8, padding 12~16radius-16, padding 20radius-24, padding 24~32
模态框radius-6, padding 16radius-12, padding 20radius-20, padding 24~32radius-32, padding 32~40
标签/Badgeradius-4, padding 2×6radius-4, padding 2×8radius-6, padding 4×10radius-full, padding 4×12
头像radius-4radius-8radius-12radius-full
下拉菜单radius-4, padding 4radius-6, padding 4radius-12, padding 8radius-16, padding 8
Toast/Alertradius-4, padding 8×12radius-8, padding 12×16radius-12, padding 16×20radius-full, padding 12×24
Tooltipradius-4, padding 4×8radius-6, padding 6×10radius-8, padding 8×12radius-full, padding 6×16

混搭原则

同一页面可组合不同风格级别,但需遵循以下规则:

1. 外层容器 ≥ 内层圆角

正确:外 > 内
  .card     { border-radius: 16px; }
  .card img { border-radius: 12px; }

错误:内 > 外 → 视觉溢出感
  .card     { border-radius: 8px;  }
  .card img { border-radius: 16px; }

2. 信息密度决定间距

区域类型推荐风格
内容浏览区Spacious / Airy(宽松间距)
工具栏/侧边栏Compact / Balanced(紧凑间距)
表单/数据区Balanced(适中间距)

3. 交互元素与容器保持同一风格

4. 圆角与尺寸的比例关系

元素尺寸SharpSoftRoundedPill
小(< 32px)4px4px8pxfull
中(32~64px)4px6~8px12~16pxfull
大(64~200px)4~6px8~12px16~24px32px
超大(> 200px)6px12px24px32px

快速选择指南

项目类型推荐风格原因
企业后台/DashboardSharp & Compact信息密度高,专业感强
SaaS产品/Web AppSoft & Balanced平衡专业与友好
消费级App/社交Rounded & Spacious亲切感,现代感
着陆页/品牌展示Pill & Airy品牌调性强,视觉冲击
数据可视化Sharp / Soft清晰的边界和对齐
移动端H5Rounded / Pill触控友好,圆角更易点击

HTML Implementation Rules

Appendix A — Responsive Scaling Snippet (REQUIRED)

Every slide HTML file MUST include this in <head> and before </body>:

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}
.slide-content {
  width: 960px;
  height: 540px;
  position: relative;
  transform-origin: center center;
}
</style>
<script>
function scaleSlide() {
  const slide = document.querySelector('.slide-content');
  if (!slide) return;
  const slideWidth = 960;
  const slideHeight = 540;
  const scaleX = window.innerWidth / slideWidth;
  const scaleY = window.innerHeight / slideHeight;
  const scale = Math.min(scaleX, scaleY);
  slide.style.width = slideWidth + 'px';
  slide.style.height = slideHeight + 'px';
  slide.style.transform = `scale(${scale})`;
  slide.style.transformOrigin = 'center center';
  slide.style.flexShrink = '0';
}
window.addEventListener('load', scaleSlide);
window.addEventListener('resize', scaleSlide);
</script>

Appendix B — CSS Rules (REQUIRED)

⚠️ Inline-Only CSS

All CSS styles MUST be inline (except the snippet in Appendix A).

  • Do NOT use <style> blocks outside Appendix A
  • Do NOT use external stylesheets
  • Do NOT use CSS classes or class-based styling
<!-- ✅ Correct: Inline styles -->
<div style="position:absolute; left:60px; top:120px; width:840px; height:240px; background:#023047;"></div>
<p style="position:absolute; left:60px; top:140px; font-size:28px; color:#ffffff;">Title</p>

<!-- ❌ Wrong: Style blocks or classes -->
<style>
  .card { background:#023047; }
</style>
<div class="card"></div>

⚠️ Background on .slide-content Directly

Do NOT create a full-size background DIV inside .slide-content. Set the background directly on .slide-content itself.

<!-- ✅ Correct: Background directly on .slide-content -->
<div class="slide-content" style="background:#023047;">
  <p style="position:absolute; left:60px; top:140px; ...">Title</p>
</div>

<!-- ❌ Wrong: Nested full-size background DIV -->
<div class="slide-content">
  <div style="position:absolute; left:0; top:0; width:960px; height:540px; background:#023047;"></div>
  <p style="position:absolute; left:60px; top:140px; ...">Title</p>
</div>

⚠️ No Bold for Body Text and Captions

  • Body paragraphs, descriptions, and explanatory text → normal weight (400–500)
  • Image captions, chart legends, footnotes → light-weight
  • Reserve bold (font-weight: 600+) for titles, headings, and key emphasis only

Appendix C — Color Palette Rules (REQUIRED)

⚠️ Strict Color Palette Adherence

  • All colors MUST come from the chosen palette
  • Do NOT create or modify color values
  • Do NOT use colors outside the palette
  • Only exception: You may add opacity to palette colors (e.g., rgba(r,g,b,0.1))

⚠️ No Gradients Allowed

  • No CSS linear-gradient(), radial-gradient(), conic-gradient()
  • No SVG <linearGradient>, <radialGradient>
  • All fills, backgrounds, borders → solid colors only

⚠️ No Animations Allowed

  • No CSS animation, @keyframes, or transition
  • No JavaScript animations
  • No hover effects with motion
  • No SVG animations (<animate>, <animateTransform>, <animateMotion>)
  • All slides are static presentation assets

For visual hierarchy without gradients/animations:

  1. Use different colors from the palette
  2. Use solid color + opacity overlay
  3. Combine palette colors strategically

Appendix D — SVG Conversion Constraints (CRITICAL)

The HTML-to-PPTX converter has STRICT SVG support limitations.

Supported SVG Elements (WHITELIST)

  • <rect> — rectangles (with rx/ry for rounded corners)
  • <circle> — circles
  • <ellipse> — ellipses
  • <line> — straight lines
  • <polyline> — connected line segments (stroke only, NO fill)
  • <polygon> — closed polyline (stroke only, NO fill)
  • <path>ONLY with M/L/H/V/Z commands
  • <pattern> — repeating patterns

<path> Command Restrictions (CRITICAL)

ONLY these commands are supported:

  • M/m — moveTo
  • L/l — lineTo
  • H/h — horizontal line
  • V/v — vertical line
  • Z/z — close path

FORBIDDEN commands (SVG will be SKIPPED in PPTX):

  • Q/q — quadratic Bézier curve
  • C/c — cubic Bézier curve
  • S/s — smooth cubic Bézier
  • T/t — smooth quadratic Bézier
  • A/a — elliptical arc

Additional SVG Constraints

  • ❌ NO rotated shapes — transform="rotate()" causes fallback failure
  • ❌ NO <text> in complex SVGs — becomes rasterized in PPTX
  • ❌ Filled <path> must form closed rectangles (M/L/H/V/Z only)
  • ⚠️ Gradients technically supported but DISCOURAGED

⚠️ CRITICAL: Pie Charts — Image Generation Tool is MANDATORY

Pie charts MUST be created using GenerateImage. There is NO SVG alternative.

  • SVG pie charts require arc commands (A) which are FORBIDDEN
  • ALL workarounds (layered circles, stroke-dasharray, clip-paths, conic-gradient, rotated segments) WILL FAIL in PPTX
  • The ONLY correct approach: generate as PNG/JPG image via GenerateImage, embed with <img>
<!-- ✅ SUPPORTED: Simple shapes -->
<svg width="200" height="4">
  <rect width="200" height="4" rx="2" fill="#dda15e"/>
</svg>

<!-- ✅ SUPPORTED: Straight line paths -->
<svg width="100" height="100">
  <path d="M10 10 L50 10 L50 50 L10 50 Z" fill="#bc6c25"/>
</svg>

<!-- ❌ FORBIDDEN: Bézier curves -->
<svg><path d="M0 10 Q25 0 50 10 T100 10" stroke="#dda15e"/></svg>

<!-- ❌ FORBIDDEN: Arc commands -->
<svg><path d="M16 4a8 8 0 0 1 5 14.3" stroke="#dda15e"/></svg>

<!-- ⚠️ WORKAROUND: Approximate curves with line segments -->
<svg><path d="M0 10 L12 6 L25 4 L37 6 L50 10" stroke="#dda15e" stroke-width="2"/></svg>

Appendix E — Advanced Techniques (REQUIRED)

SVG — ONLY for Decorative Shapes (NOT a replacement for real images)

  • ⚠️ SVG is for decorative elements ONLY. It does NOT satisfy the "real image" requirement.
  • You MUST still use GenerateImage for actual photos/illustrations even if SVG is used for diagrams.
  • Do NOT use SVG to "draw" illustrations, backgrounds, or hero visuals.

SVG Usage Guidelines

  • Prefer SVG for all decorative shapes (lines/dividers, corner accents, badges, frames, arrows)
  • SVG gives pixel-crisp geometry that won't blur under transform: scale()
  • Use SVG for masks/overlays and diagram-like UI (timeline rails, connectors)
  • Rule of thumb: if it's a "shape" (not text, not a photo), SVG is usually cleanest
  • ⚠️ ALWAYS check Appendix D constraints before writing SVG paths

⚠️ CRITICAL: Background Shapes Must Use SVG

Do NOT use CSS background/border for decorative background shapes. These must use SVG:

  • Badge/tag backgrounds (rounded rectangles, pill shapes)
  • Feature tag backgrounds
  • Card borders
  • Button-like backgrounds
  • Dividers (NOT CSS background, border, or <hr>)

Reason: CSS borders/backgrounds blur under transform: scale(). SVG stays crisp.

<!-- ✅ Correct: SVG badge with text INSIDE the SVG -->
<svg width="180" height="52" viewBox="0 0 180 52">
  <rect width="180" height="52" rx="26" fill="#fb8500"/>
  <text x="90" y="26" text-anchor="middle" dominant-baseline="central"
        font-size="16" font-weight="700" fill="#ffffff">LABEL</text>
</svg>

<!-- ❌ Wrong: span overlay on SVG (text lost in PPTX) -->
<div class="badge">
  <svg><rect .../></svg>
  <span>LABEL</span>
</div>

<!-- ❌ Wrong: CSS background -->
<div style="background: #fb8500; border-radius: 26px;"><span>LABEL</span></div>

<!-- ✅ Correct: SVG divider -->
<svg width="120" height="4" aria-hidden="true">
  <rect width="120" height="4" rx="2" fill="#219ebc"/>
</svg>

<!-- ❌ Wrong: CSS divider -->
<div style="width: 120px; height: 4px; background: #219ebc;"></div>

SVG Use Cases

1. Background Patterns — Geometric textures for visual depth:

<!-- Dot grid pattern -->
<svg width="100%" height="100%" style="position:absolute;top:0;left:0;opacity:0.08;pointer-events:none;">
  <defs>
    <pattern id="dots" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse">
      <circle cx="20" cy="20" r="2" fill="currentColor"/>
    </pattern>
  </defs>
  <rect width="100%" height="100%" fill="url(#dots)"/>
</svg>

<!-- Diagonal stripes -->
<svg width="100%" height="100%" style="position:absolute;top:0;left:0;opacity:0.05;pointer-events:none;">
  <defs>
    <pattern id="stripes" width="20" height="20" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
      <rect width="10" height="20" fill="currentColor"/>
    </pattern>
  </defs>
  <rect width="100%" height="100%" fill="url(#stripes)"/>
</svg>

2. Decorative Elements:

<!-- L-shaped corner decoration -->
<svg width="40" height="40" style="position:absolute;top:0;left:0;" aria-hidden="true">
  <path d="M0 35 L0 0 L35 0" stroke="currentColor" stroke-width="2" fill="none" opacity="0.4"/>
</svg>

<!-- Straight divider line -->
<svg width="400" height="2" aria-hidden="true">
  <rect width="400" height="2" fill="currentColor" opacity="0.3"/>
</svg>

<!-- Simple arrow (right-pointing) -->
<svg width="40" height="16" viewBox="0 0 40 16" aria-hidden="true">
  <path d="M0 8 L32 8 M24 2 L32 8 L24 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</svg>

3. Icons:

<!-- Checkmark icon (polyline - SUPPORTED) -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
  <polyline points="20 6 9 17 4 12"/>
</svg>

<!-- Simple arrow icon (path with L/M - SUPPORTED) -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M5 12 L19 12 M12 5 L19 12 L12 19"/>
</svg>

<!-- Plus sign icon (lines - SUPPORTED) -->
<svg width="24" height="24" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
  <line x1="12" y1="5" x2="12" y2="19"/>
  <line x1="5" y1="12" x2="19" y2="12"/>
</svg>

4. Data Visualization Helpers:

<!-- Percentage ring (70%) -->
<svg width="100" height="100" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" stroke="#e0e0e0" stroke-width="8" fill="none"/>
  <circle cx="50" cy="50" r="40" stroke="#4CAF50" stroke-width="8" fill="none"
          stroke-dasharray="251.3" stroke-dashoffset="75.4" stroke-linecap="round"
          transform="rotate(-90 50 50)"/>
  <text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-size="20" font-weight="bold" fill="currentColor">70%</text>
</svg>

<!-- Horizontal progress bar -->
<svg width="200" height="12" viewBox="0 0 200 12">
  <rect x="0" y="0" width="200" height="12" rx="6" fill="#e0e0e0"/>
  <rect x="0" y="0" width="140" height="12" rx="6" fill="#2196F3"/>
</svg>

<!-- Mini bar chart -->
<svg width="80" height="40" viewBox="0 0 80 40">
  <rect x="0" y="20" width="12" height="20" fill="currentColor" opacity="0.6"/>
  <rect x="17" y="10" width="12" height="30" fill="currentColor" opacity="0.8"/>
  <rect x="34" y="5" width="12" height="35" fill="currentColor"/>
  <rect x="51" y="15" width="12" height="25" fill="currentColor" opacity="0.7"/>
  <rect x="68" y="8" width="12" height="32" fill="currentColor" opacity="0.9"/>
</svg>

5. Masks & Overlays:

<!-- Bottom overlay for text readability -->
<svg width="100%" height="300" style="position:absolute;bottom:0;left:0;pointer-events:none;">
  <rect width="100%" height="100%" fill="#000000" fill-opacity="0.7"/>
</svg>

<!-- Side overlay -->
<svg width="400" height="100%" style="position:absolute;left:0;top:0;pointer-events:none;">
  <rect width="100%" height="100%" fill="#000000" fill-opacity="0.8"/>
</svg>

SVG Implementation Tips

  • Use vector-effect="non-scaling-stroke" to keep stroke widths stable under transform: scale()
  • For thin lines, prefer filled rectangles to avoid stroke anti-alias artifacts
  • Use overflow="visible" when SVG needs to extend beyond its box
  • Use aria-hidden="true" for purely decorative SVGs
  • Use currentColor for easy theming
  • Use pointer-events: none for overlay SVGs

Minimal Patterns

<!-- Crisp divider line -->
<svg overflow="visible" width="320" height="2" aria-hidden="true">
  <rect width="320" height="2" fill="rgba(255,255,255,0.35)"></rect>
</svg>

<!-- Consistent stroke under scaling -->
<svg overflow="visible" width="320" height="2" aria-hidden="true">
  <path vector-effect="non-scaling-stroke" d="M0 1 L320 1" stroke="rgba(255,255,255,0.55)" stroke-width="2"></path>
</svg>

<!-- Solid overlay -->
<svg width="100%" height="200" style="position:absolute;bottom:0;left:0;pointer-events:none;">
  <rect width="100%" height="100%" fill="#000000" fill-opacity="0.6"/>
</svg>

Appendix F — HTML2PPTX Validation Rules (REQUIRED)

Layout and Dimensions

  • Slide content must not overflow (no scrollbars)
  • Text elements larger than 12pt must be at least 0.5″ above bottom edge
  • HTML body dimensions must match 960×540

Backgrounds and Images

  • No CSS gradients
  • No background-image on div elements
  • For slide backgrounds, use a real <img> element
  • Solid background colors → on .slide-content directly

Text Elements

  • p, h1h6, ul, ol, li must NOT have background, border, or shadow
  • Inline elements (span, b, i, u, strong, em) must NOT have margins
  • Do NOT use manual bullet symbols — use <ul> or <ol> lists
  • Do NOT leave raw text directly inside div — wrap all text in text tags

SVG and Text

  • Do NOT place text (<span>, <p>) as overlay on SVG using absolute positioning — text will be LOST in PPTX
  • When badge/tag/label needs text on SVG background, put text INSIDE SVG using <text> element
  • SVG <text> must use text-anchor="middle" and dominant-baseline="central" for centering
<!-- ✅ Correct: Text inside SVG -->
<svg width="100" height="32" viewBox="0 0 100 32">
  <rect width="100" height="32" rx="16" fill="#bc6c25"/>
  <text x="50" y="16" text-anchor="middle" dominant-baseline="central"
        font-size="14" font-weight="700" fill="#fefae0" letter-spacing="3">丰收季</text>
</svg>

<!-- ❌ Wrong: Text overlaid on SVG (LOST in PPTX) -->
<div class="badge">
  <svg aria-hidden="true"><rect .../></svg>
  <span style="position:absolute;">丰收季</span>
</div>

Placeholders

  • Elements with class placeholder must have non-zero width and height

Appendix G — Page Number Badge / 角标 (REQUIRED)

All slides except Cover Page MUST include a page number badge showing the current slide number in the bottom-right corner.

  • Position: position:absolute; right:32px; bottom:24px;
  • Must use SVG (text inside <text>, not overlaid <span>)
  • Colors from palette only; keep it subtle; same style across all slides
  • Show current number only (e.g. 3 or 03), NOT "3/12"
<!-- ✅ Circle badge (default) -->
<svg style="position:absolute; right:32px; bottom:24px;" width="36" height="36" viewBox="0 0 36 36">
  <circle cx="18" cy="18" r="18" fill="#219ebc"/>
  <text x="18" y="18" text-anchor="middle" dominant-baseline="central"
        font-size="14" font-weight="600" fill="#ffffff">3</text>
</svg>

<!-- ✅ Pill badge -->
<svg style="position:absolute; right:32px; bottom:24px;" width="48" height="28" viewBox="0 0 48 28">
  <rect width="48" height="28" rx="14" fill="#219ebc"/>
  <text x="24" y="14" text-anchor="middle" dominant-baseline="central"
        font-size="13" font-weight="600" fill="#ffffff">03</text>
</svg>

<!-- ✅ Minimal (number only) -->
<p style="position:absolute; right:36px; bottom:24px; margin:0; font-size:13px; font-weight:500; color:#8ecae6;">03</p>

Common Mistakes to Avoid

  • Don't repeat the same layout — vary columns, cards, and callouts across slides
  • Don't center body text — left-align paragraphs and lists; center only titles
  • Don't skimp on size contrast — titles need 36pt+ to stand out from 14–16pt body
  • Don't default to blue — pick colors reflecting the specific topic
  • Don't mix spacing randomly — choose 0.3″ or 0.5″ gaps and use consistently
  • Don't style one slide and leave the rest plain — commit fully or keep it simple throughout
  • Don't create text-only slides — add images, icons, charts, or visual elements
  • Don't forget text box padding — when aligning shapes with text edges, set margin: 0 or offset
  • Don't use low-contrast elements — icons AND text need strong contrast against background
  • NEVER use accent lines under titles — hallmark of AI-generated slides; use whitespace or background color instead
  • Don't use gradients — solid colors only (Appendix C)
  • Don't use animations — static slides only (Appendix C)
  • Don't overlay text on SVG with absolute positioning — text will be lost in PPTX (Appendix F)
  • Don't use CSS for decorative shapes — use SVG for crispness under scaling (Appendix E)
  • Don't forget the page number badge — required on all slides except cover (Appendix G)
  • Don't use Bézier curves or arcs in SVG paths — PPTX converter will skip them (Appendix D)

File & Output Conventions

ItemConvention
Slide filesslides/slide-01.html, slides/slide-02.html, … (zero-padded)
Image filesslides/imgs/ directory
Slide dimensions960×540 px (.slide-content)
FontTimes New Roman for all text (Chinese and English)
CSSInline only (except Appendix A scaling snippet)
ColorsFrom chosen palette only; no gradients
AnimationsNone — static slides only
Page badgeAll slides except cover; bottom-right corner
Final deploymentUse deploy_html_presentation tool

Tools Reference

ToolPurposeWhen to Use
GenerateImageCreate images for slidesMANDATORY for cover + content pages; optional for TOC/divider/summary
get_html_presentation_screenshotTake screenshot of rendered HTML slideAfter writing every slide HTML
images_understandAnalyze screenshot for layout issuesAfter every screenshot — verify no overlaps, correct layout, badge present
deploy_html_presentationMerge slides and deploy final presentationStep 5 — after all slides are verified