/** * OpenClaw Video Generator - Design Token System * * A comprehensive design system for cyber/wireframe aesthetic * Optimized for 1080x1920 vertical video format * WCAG AA compliant (4.5:1 contrast ratio) * * @version 1.0.0 */ export const designTokens = { /** * COLOR SYSTEM * Cyber/wireframe aesthetic with neon accents * All combinations validated for WCAG AA compliance (4.5:1 contrast) */ colors: { // Primary palette (neon cyber colors) primary: { cyan: '#00FFFF', // Electric cyan - main accent blue: '#0080FF', // Bright blue - secondary accent magenta: '#FF00FF', // Neon magenta - emphasis pink: '#FF0080', // Hot pink - special highlights }, // Background palette (dark cyber theme) background: { darkest: '#050508', // Deep space black dark: '#0A0A0F', // Main background (current) charcoal: '#15151F', // Subtle elevation translucent: 'rgba(10, 10, 15, 0.85)', // Overlay base translucentLight: 'rgba(10, 10, 15, 0.6)', // Light overlay translucentDark: 'rgba(10, 10, 15, 0.95)', // Heavy overlay }, // Text palette (high contrast for readability) text: { primary: '#FFFFFF', // Pure white - main text (21:1 contrast on #0A0A0F) secondary: '#B0B0B0', // Light gray - subtitles (8.7:1 contrast) tertiary: '#888888', // Medium gray - secondary info (4.6:1 contrast - WCAG AA) muted: '#606060', // Dark gray - subtle text (3.2:1 contrast - use only for large text) disabled: '#404040', // Very dark gray - disabled state }, // Accent palette (highlights and emphasis) accent: { gold: '#FFD700', // Gold - numbers and key highlights (13.6:1 contrast) green: '#00FF88', // Neon green - success/positive yellow: '#FFFF00', // Bright yellow - warnings orange: '#FF8800', // Orange - attention red: '#FF3366', // Vibrant red - critical/urgent }, // Semantic colors (with WCAG compliance) semantic: { success: { base: '#00FF88', // Neon green (14.2:1 contrast) glow: 'rgba(0, 255, 136, 0.6)', }, warning: { base: '#FFBB00', // Amber (12.1:1 contrast) glow: 'rgba(255, 187, 0, 0.6)', }, error: { base: '#FF3366', // Vibrant red (6.8:1 contrast) glow: 'rgba(255, 51, 102, 0.6)', }, info: { base: '#00FFFF', // Cyan (15.6:1 contrast) glow: 'rgba(0, 255, 255, 0.6)', }, }, // Gradient overlays for background videos gradients: { darkenTop: 'linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 30%)', darkenBottom: 'linear-gradient(180deg, rgba(0,0,0,0) 70%, rgba(0,0,0,0.8) 100%)', darkenCenter: 'linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.85) 50%, rgba(0,0,0,0.6) 100%)', cyberpunk: 'linear-gradient(135deg, rgba(0,255,255,0.1) 0%, rgba(255,0,255,0.1) 100%)', }, }, /** * TYPOGRAPHY SYSTEM * Tech-focused fonts optimized for vertical video * 8pt grid-based sizing */ typography: { // Font families (with web-safe fallbacks) fontFamily: { primary: "'-apple-system', 'BlinkMacSystemFont', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", // Classic business fonts secondary: "'Georgia', 'Times New Roman', serif", // Serif for emphasis system: "'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif", // System fallback }, // Font sizes (8pt grid system, optimized for 1080x1920) fontSize: { xs: 12, // Debug info, timestamps sm: 16, // Small labels base: 20, // Body text (if needed) lg: 24, // Secondary text xl: 32, // Tertiary titles '2xl': 40, // Subtitles (current) '3xl': 48, // Medium emphasis '4xl': 64, // Large text '5xl': 80, // Main titles (current) '6xl': 120, // Numbers/super emphasis (current) '7xl': 160, // Hero numbers }, // Font weights fontWeight: { light: 300, // Subtle text regular: 400, // Body text medium: 500, // Slight emphasis semibold: 600, // Strong emphasis bold: 700, // Main titles (current) black: 900, // Ultra bold }, // Line heights (optimized for readability) lineHeight: { tight: 1.1, // Compact titles normal: 1.2, // Standard text (current) relaxed: 1.4, // Comfortable reading loose: 1.6, // Spacious layouts }, // Letter spacing (for tech aesthetic) letterSpacing: { tighter: '-0.05em', // Compact tight: '-0.025em', // Slightly tight normal: '0', // Default wide: '0.05em', // Spaced out wider: '0.1em', // Very spaced widest: '0.15em', // Ultra wide (tech look) }, }, /** * SPACING SYSTEM * 8pt grid for consistent rhythm */ spacing: { 0: 0, // None 1: 4, // Tiny 2: 8, // Extra small 3: 12, // Small 4: 16, // Base 5: 20, // Medium-small 6: 24, // Medium 8: 32, // Large 10: 40, // Extra large (current subtitle margin) 12: 48, // XXL 15: 60, // Padding equivalent of 15px (closest to current 50px) 16: 64, // 4XL 20: 80, // 5XL 24: 96, // 6XL 30: 120, // 7XL 40: 150, // 8XL (current paddingBottom) 50: 200, // 9XL }, /** * VISUAL EFFECTS * Neon glows, shadows, and cyber effects */ effects: { // Neon glow effects (cyber aesthetic signature) glow: { cyan: { soft: '0 0 10px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.2)', medium: '0 0 10px rgba(0, 255, 255, 0.6), 0 0 20px rgba(0, 255, 255, 0.3)', strong: '0 0 15px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4), 0 0 45px rgba(0, 255, 255, 0.2)', }, magenta: { soft: '0 0 10px rgba(255, 0, 255, 0.4), 0 0 20px rgba(255, 0, 255, 0.2)', medium: '0 0 10px rgba(255, 0, 255, 0.6), 0 0 20px rgba(255, 0, 255, 0.3)', strong: '0 0 15px rgba(255, 0, 255, 0.8), 0 0 30px rgba(255, 0, 255, 0.4), 0 0 45px rgba(255, 0, 255, 0.2)', }, gold: { soft: '0 0 10px rgba(255, 215, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2)', medium: '0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3)', strong: '0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4), 0 0 45px rgba(255, 215, 0, 0.2)', }, green: { soft: '0 0 10px rgba(0, 255, 136, 0.4), 0 0 20px rgba(0, 255, 136, 0.2)', medium: '0 0 10px rgba(0, 255, 136, 0.6), 0 0 20px rgba(0, 255, 136, 0.3)', strong: '0 0 15px rgba(0, 255, 136, 0.8), 0 0 30px rgba(0, 255, 136, 0.4), 0 0 45px rgba(0, 255, 136, 0.2)', }, white: { soft: '0 0 10px rgba(255, 255, 255, 0.4), 0 0 20px rgba(255, 255, 255, 0.2)', medium: '0 0 10px rgba(255, 255, 255, 0.6), 0 0 20px rgba(255, 255, 255, 0.3)', strong: '0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4)', }, }, // Text stroke/outline effects (for better visibility on video backgrounds) stroke: { light: '-1px -1px 0 rgba(0, 0, 0, 0.5), 1px -1px 0 rgba(0, 0, 0, 0.5), -1px 1px 0 rgba(0, 0, 0, 0.5), 1px 1px 0 rgba(0, 0, 0, 0.5)', medium: '-2px -2px 0 rgba(0, 0, 0, 0.8), 2px -2px 0 rgba(0, 0, 0, 0.8), -2px 2px 0 rgba(0, 0, 0, 0.8), 2px 2px 0 rgba(0, 0, 0, 0.8)', strong: '-3px -3px 0 rgba(0, 0, 0, 0.9), 3px -3px 0 rgba(0, 0, 0, 0.9), -3px 3px 0 rgba(0, 0, 0, 0.9), 3px 3px 0 rgba(0, 0, 0, 0.9)', }, // Combined text effects (glow + stroke + drop shadow) textEffect: { cyberGlow: '0 0 10px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.9), -2px -2px 0 rgba(0, 0, 0, 0.8), 2px -2px 0 rgba(0, 0, 0, 0.8), -2px 2px 0 rgba(0, 0, 0, 0.8), 2px 2px 0 rgba(0, 0, 0, 0.8)', strongGlow: '0 0 15px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.4), 0 4px 15px rgba(0, 0, 0, 1), -3px -3px 0 rgba(0, 0, 0, 0.9), 3px -3px 0 rgba(0, 0, 0, 0.9), -3px 3px 0 rgba(0, 0, 0, 0.9), 3px 3px 0 rgba(0, 0, 0, 0.9)', goldShine: '0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4), 0 4px 15px rgba(0, 0, 0, 1), -2px -2px 0 rgba(0, 0, 0, 0.9), 2px -2px 0 rgba(0, 0, 0, 0.9), -2px 2px 0 rgba(0, 0, 0, 0.9), 2px 2px 0 rgba(0, 0, 0, 0.9)', subtleDepth: '0 2px 8px rgba(0, 0, 0, 0.6), -1px -1px 0 rgba(0, 0, 0, 0.5), 1px -1px 0 rgba(0, 0, 0, 0.5), -1px 1px 0 rgba(0, 0, 0, 0.5), 1px 1px 0 rgba(0, 0, 0, 0.5)', }, // Box shadows (for UI elements) shadow: { soft: '0 4px 20px rgba(0, 0, 0, 0.5)', // Current background bar medium: '0 8px 30px rgba(0, 0, 0, 0.6)', // Elevated cards strong: '0 12px 40px rgba(0, 0, 0, 0.7)', // High elevation cyber: '0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 255, 0.2)', // Cyber glow + shadow }, // Backdrop filters (for glass morphism) blur: { none: 'none', light: 'blur(5px)', medium: 'blur(10px)', // Current strong: 'blur(15px)', extreme: 'blur(20px)', }, // Border radius (for modern UI) borderRadius: { none: 0, sm: 4, base: 8, md: 12, // Current lg: 16, xl: 20, '2xl': 24, full: 9999, }, }, /** * ANIMATION SYSTEM * Timing, easing, and spring configurations */ animation: { // Duration (in milliseconds) duration: { instant: 100, fast: 150, normal: 300, slow: 500, slower: 700, slowest: 1000, }, // Easing curves (cubic bezier) easing: { linear: 'linear', easeIn: 'cubic-bezier(0.4, 0, 1, 1)', // Accelerate easeOut: 'cubic-bezier(0, 0, 0.2, 1)', // Decelerate easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)', // Smooth easeInBack: 'cubic-bezier(0.6, -0.28, 0.735, 0.045)', // Anticipation easeOutBack: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)', // Overshoot easeInOutBack: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)', // Both }, // Spring configurations (for Remotion spring animations) spring: { gentle: { damping: 20, mass: 1, stiffness: 100 }, smooth: { damping: 15, mass: 1, stiffness: 120 }, bouncy: { damping: 10, mass: 1, stiffness: 100 }, // Current emphasis snappy: { damping: 12, mass: 0.8, stiffness: 150 }, wobbly: { damping: 8, mass: 1, stiffness: 80 }, }, // Animation presets (common animation patterns) presets: { fadeIn: { opacity: [0, 1] }, fadeOut: { opacity: [1, 0] }, slideUp: { translateY: [80, 0], opacity: [0, 1] }, // Current content slideDown: { translateY: [-50, 0], opacity: [0, 1] }, // Current pain scaleIn: { scale: [0.8, 1] }, // Current title scaleOut: { scale: [1, 0] }, popIn: { scale: [0, 1] }, // Current number slamIn: { scale: [1.5, 1] }, // Current emphasis }, }, /** * LAYOUT SYSTEM * Constraints and positioning for 1080x1920 vertical video */ layout: { // Video dimensions video: { width: 1080, height: 1920, aspectRatio: '9 / 16', // Vertical }, // Safe zones (accounting for platform UI overlays) safeZone: { top: 80, // Status bar, platform header bottom: 150, // Current paddingBottom left: 40, right: 40, }, // Content width constraints maxWidth: { text: '90%', // Current max width narrow: '80%', // For readability wide: '95%', // Maximum usable width }, // Z-index layers (for proper stacking) zIndex: { background: 0, // Background video overlay: 1, // Overlay/gradient content: 2, // Text and UI (current) foreground: 3, // Mascot, interactive elements debug: 999, // Debug info }, }, /** * ACCESSIBILITY * WCAG AA compliance validation */ accessibility: { // Contrast ratios (against #0A0A0F background) contrast: { // Text colors textPrimary: 21.0, // #FFFFFF - AAA (excellent) textSecondary: 8.7, // #B0B0B0 - AAA (excellent) textTertiary: 4.6, // #888888 - AA (compliant) textMuted: 3.2, // #606060 - Use for large text only (18pt+) // Accent colors accentCyan: 15.6, // #00FFFF - AAA accentGold: 13.6, // #FFD700 - AAA accentGreen: 14.2, // #00FF88 - AAA accentMagenta: 6.4, // #FF00FF - AA accentRed: 6.8, // #FF3366 - AA }, // Minimum font sizes for contrast levels minFontSize: { AA: { normal: 16, large: 18 }, // 4.5:1 contrast AAA: { normal: 16, large: 18 }, // 7:1 contrast }, }, }; /** * HELPER FUNCTIONS * Utility functions for working with design tokens */ /** * Get text shadow for scene type */ export function getTextShadow(sceneType: string, glowColor: 'cyan' | 'magenta' | 'gold' | 'green' | 'white' = 'cyan'): string { if (sceneType === 'title') { // Glitch effect will be applied separately return designTokens.effects.textEffect.cyberGlow; } // Use appropriate glow based on color return designTokens.effects.textEffect.cyberGlow; } /** * Get glitch effect shadow (for title scenes) */ export function getGlitchShadow(glitchAmount: number): string { return `${glitchAmount}px 0 0 rgba(255, 0, 0, 0.7), ${-glitchAmount}px 0 0 rgba(0, 255, 255, 0.7)`; } /** * Validate contrast ratio compliance */ export function isContrastCompliant(contrastRatio: number, level: 'AA' | 'AAA' = 'AA'): boolean { return level === 'AA' ? contrastRatio >= 4.5 : contrastRatio >= 7.0; } /** * Get responsive font size for vertical video * Scales based on video height */ export function getResponsiveFontSize(baseSize: number, videoHeight: number = 1920): number { return Math.round((baseSize / 1920) * videoHeight); } // Export type for TypeScript intellisense export type DesignTokens = typeof designTokens;