--- name: pmg-glassmorphism description: "Compose translucent acrylic PowerPoint surfaces, borders and readable overlays with intentional layering. Uses shared native shape helpers and delegates animation to the PMG engine." --- # PMG Glassmorphism (`pmg-glassmorphism`) ## Responsibility and dependencies Acrylic surfaces, alpha, borders, contrast and layered composition. Supports intentional overlap, moving background layers and masks when implemented; does not own camera or animation compilation. Dependencies: pmg-engine; pmg-core; existing add_glass_card/theme helpers. All generated candidates must pass PMGOrchestrator before delivery; direct save/COM snippets below are lower-level composition examples, not independent production entrypoints. Glassmorphism in PMG creates high-end, tactile telemetry surfaces. It allows underlying motion, 3D elements, or photography to subtly reveal depth while maintaining 100% text readability. --- ## 1. Light Mode Frosted Acrylic (Primary Standard) In light themes, frosted cards provide structural elevation without heavy dark shadows: ```xml ``` ### Contrast Invariants for Light Glass - **Card Background:** `#FFFFFF` at `90% - 94%` alpha. - **Card Border:** `#0284C7` (Sky Cyan), `#4F46E5` (Indigo), or `#CBD5E1` (Neutral Hairline). - **Text Inside Card:** Strictly `#0F172A` (Headings) and `#475569` (Body). **Never use white or light gray text on light glass cards.** --- ## 2. Dark Mode Obsidian Glass (Secondary Option) For aerospace and late-night tech keynotes: ```xml ``` --- ## 3. Multi-Tier Glass Card Architecture ``` +-------------------------------------------------------------+ | PRIMARY FROSTED CARD (width: 5.8", height: 4.8", alpha: 92%)| | | | [ STATUS PILL: alpha 95%, bg: #0284C7, text: white ] | | KHẢO SÁT THỰC TẾ // BƯỚC 01 | | | | Title: NHẬN THỨC VÀ HÀNH VI SINH VIÊN | | Subtitle: Dữ liệu phân loại rác thải tại HUTECH 2026 | | | | +-------------------------------------------------------+ | | | NESTED METRIC CARD (white alpha: 80%, height: 1.2") | | | | Tỷ lệ nhận thức: 97.7% | Muốn giải quyết: 100% | | | +-------------------------------------------------------+ | +-------------------------------------------------------------+ ``` ### Python Implementation ```python from scripts.motion_graph_kit import MotionDeck deck = MotionDeck() slide = deck.add_slide(transition="none") deck.add_glass_card( slide, left=6.6, top=1.3, width=5.8, height=4.8, name="!!hero_glass", bg_hex="FFFFFF", alpha="92000", border_hex="0284C7", border_alpha="55000", border_width_pt=1.25, corner_radius=6000 ) ```