Google Antigravity 2.x 全量高刷、无损热切、多风格深度美化套件
Deep visual restyling, high-refresh smooth animations, and instant zero-restart theme hot-switching for Google Antigravity.
📖 English Documentation | 📖 简体中文文档
Antigravity Theme 是一套专为 Google Antigravity 2.x 客户端打造的深度视觉美化与性能增强套件。
项目打破了传统 Electron 客户端单调的视觉体验,在完全不影响原有核心编码与 AI 交互功能的前提下,注入了五套极具艺术张力与实用性的定制主题。同时采用非侵入式加载器架构,结合自研的 CDP(Chrome DevTools Protocol)通讯通道,实现了无需重启客户端、0.1 秒全窗口无感秒级切换。
| 主题代号 | 视觉流派 | 核心调色板 | 特色组件与质感 | 切换指令 |
|---|---|---|---|---|
| 🎭 phantom | Persona 5 潮酷怪盗波普风 | #D81124 (怪盗猩红)#121212 (夜幕曜黑)#F5F5F5 (高光纯白) |
警戒斜纹切角、高饱和波普徽章、锋利几何折角、动感对话流 | switch phantom |
| 🍵 matcha | 治愈系抹茶日记手帐风 | #2D4B39 (深苔竹青)#5B8A68 (抹茶苍绿)#F6F8F3 (日式和纸) |
手帐贴纸质感、书签便签角标、柔和护眼纸纹、优雅圆润排版 | switch matcha |
| ✒️ doodle | 纯线稿漫画粉印手绘风 | #202020 (墨线勾勒)#FDFCF7 (手绘糙纸)#E84855 (落款粉印) |
黑白漫画分镜框、直角硬边分割、印章式交互反馈、纯粹纸质感 | switch doodle |
| 👾 pixel | 8-Bit 复古像素极客风 | Sweetie-16 经典复古调色板 点阵荧光绿 / 琥珀橙 |
中文点阵字体、CRT 扫描线与荧光微光、像素方块滑块、复古进度条 | switch pixel |
| 🔮 glass | 液态玻璃拟态风 [Demo 尝鲜版] |
极光流体渐变壁纸#70D6FF (冰晶蓝)#FF70A6 (极光粉) |
真实 SVG 边缘折射滤镜、毛玻璃背景模糊、不等亮内描边高光、胶囊拟态控件 | switch glass |
💡 关于
glass(液态玻璃) Demo 尝鲜版说明:glass主题引入了真正的 SVG 边缘透镜折射滤镜(Displacement Map)与 CSS 极光动态壁纸。2026-09-18 起鼠标跟随透镜换成移植自 zsio/liquid-glass 的 2D SDF 光学引擎(斯涅尔折射轮廓 + 三通道色散 + 全内反射 + 倒角流光),透镜中心光学平坦、底下文字照常可读;暗色模式改用深色填充玻璃,输入框/卡片不再被壁纸亮色冲白。右下角「调参面板」可实时调透镜直径/折射/倒角/色散。当前仍处于 Demo 预览阶段。
- ⚡ 0 重启秒级热切换 (Zero-Restart CDP Hot-Switching)
- 内置
switch.bat/switch-theme.ps1(Windows) 及switch.sh(macOS),自动通过本地 DevTools 端口建立调试连接。 - 无需关闭或重启 Antigravity,也不必重新封包 asar,一键输入主题代号,0.1 秒内所有渲染进程自动完成样式热重载。
- 内置
- 🏎️ 60Hz / 144Hz / 165Hz 高刷平滑调优
- 彻底排查并拆除了每帧触发全树重排的注册
@propertyCSS 变量动画。 - 所有平移与缩放严格对齐物理设备像素(
calc(N * var(--px-dev))),彻底杜绝点阵字体重采样发糊与长任务(Long Tasks)掉帧卡顿。
- 彻底排查并拆除了每帧触发全树重排的注册
- 🪟 自绘像素级无缝窗口按钮 (Windows) 与 macOS 原生交通灯融合
- 彻底绕过 Windows 11
titleBarOverlay无法自定义底色并偶现浅白条闪烁的系统缺陷,采用自绘按钮完美融入顶栏。 - macOS 下自动适配 Traffic Lights 原生位置与窗口留白。
- 彻底绕过 Windows 11
- 🛡️ 非侵入式安全架构
- 仅在
app.asar中注入微型加载器钩子(数十行),所有主题 CSS 与字体资源完全存放在 asar 外部目录(resources/<theme>/)。 - 注入器支持动态通用寻路,支持任意名称的新主题自动加载。
- 用户可随时以纯文本方式修改 CSS,按下
Ctrl + R/Cmd + R即可实时见效。 - 安装前自动备份原始包(
app.asar.pixel-backup),卸载脚本能够 100% 无损恢复原厂状态。
- 仅在
- 操作系统:macOS (Apple Silicon / Intel) 或 Windows 10 / 11 (x64)
- 目标应用:Google Antigravity 2.x
- 依赖工具:Node.js(Node 18+,需确保
node与npx可在终端调用)
- 完全退出 Antigravity(macOS 可在菜单栏退出或加
-k;Windows 加-KillRunning自动强退); - 在本项目根目录下执行:
# === macOS === # 默认安装 phantom 主题(加 -k 自动退出运行中的应用) ./install.sh -k # 或指定安装主题:phantom | matcha | doodle | pixel | glass ./install.sh -t glass -k
# === Windows === # 默认安装 phantom 主题(加 -KillRunning 自动退出) powershell -ExecutionPolicy Bypass -File .\install.ps1 -KillRunning # 或指定安装主题(也可双击运行 install.bat) powershell -ExecutionPolicy Bypass -File .\install.ps1 -Theme glass -KillRunning
- 安装完成后启动 Antigravity,即可看到全新视觉效果!
美化包支持免重启热切,随时在终端执行:
# === macOS ===
./switch.sh # 打开交互式数字选择菜单(按 1~5 快速选择)
./switch.sh phantom # 切换至 Persona 5 怪盗波普风
./switch.sh matcha # 切换至 治愈系抹茶日记风
./switch.sh doodle # 切换至 纯线稿漫画手绘风
./switch.sh pixel # 切换至 8-Bit 复古像素风
./switch.sh glass # 切换至 液体玻璃拟态风 [Demo版]:: === Windows (CMD / PowerShell 通用,或直接双击 switch.bat) ===
switch :: 打开交互式数字选择菜单(按 1~5 快速选择)
switch phantom :: 切换至 Persona 5 怪盗波普风
switch matcha :: 切换至 治愈系抹茶日记风
switch doodle :: 切换至 纯线稿漫画手绘风
switch pixel :: 切换至 8-Bit 复古像素风
switch glass :: 切换至 液体玻璃拟态风 [Demo版]如需恢复原版官方界面:
# === macOS ===
./uninstall.sh -k:: === Windows (或双击 uninstall.bat) ===
powershell -ExecutionPolicy Bypass -File .\uninstall.ps1 -KillRunning卸载程序会自动从备份无损还原 app.asar,并彻底清理所有外置主题资产文件。
所有主题样式文件均安装在外部用户目录:
# Windows:
%LOCALAPPDATA%\Programs\Antigravity\resources\<theme-name>\<theme-name>.css
# macOS:
/Applications/Antigravity.app/Contents/Resources/<theme-name>/<theme-name>.css
- 实时调色:用任意编辑器打开对应
.css文件,修改顶部:root变量区(例如背景色、强调色、字体大小),保存后在 Antigravity 窗口按下Ctrl + R(Windows) 或Cmd + R(macOS) 即可在 1 秒内看到修改结果,无需重新安装! - 新增自定义主题 / 复用至其他 Electron 客户端:请详阅 复用指南.md。
Antigravity Theme is a comprehensive visual restyling, performance optimization, and hot-switching theme suite engineered for Google Antigravity 2.x client across Windows and macOS.
It replaces the default monochromatic interface with five high-aesthetic, production-ready design styles without interfering with any core coding, extension, or AI features. Utilizing a non-invasive external asset architecture alongside direct Chrome DevTools Protocol (CDP) integration, it allows users to switch themes within 0.1 seconds without restarting the app.
| Theme Key | Aesthetics & Design Philosophy | Primary Palette | Key Visual Characteristics | Quick Switch |
|---|---|---|---|---|
| 🎭 phantom | Persona 5 Bold Pop-Art | #D81124 (Crimson)#121212 (Obsidian)#F5F5F5 (Pure White) |
Slanted hazard warning stripes, high-saturation pop badges, sharp geometric angles | switch phantom |
| 🍵 matcha | Japanese Matcha Diary | #2D4B39 (Deep Moss)#5B8A68 (Matcha Green)#F6F8F3 (Washi Paper) |
Stationery stickers, bookmark tabs, warm eye-protective paper tone, rounded flow | switch matcha |
| ✒️ doodle | Comic Manga Line Art | #202020 (Ink Outline)#FDFCF7 (Rough Paper)#E84855 (Seal Stamp Red) |
Clean storyboard panels, right-angled framing, ink stamp accent feedback | switch doodle |
| 👾 pixel | 8-Bit Retro Geek Art | Sweetie-16 16-color palette Dot-matrix phosphor glow |
Chinese/English dot-matrix font, CRT scanlines, pixelated block scrollbars | switch pixel |
| 🔮 glass | Liquid Glass Skeuomorphism [Demo Preview] |
Aurora gradient fluid mesh#70D6FF (Ice Blue)#FF70A6 (Aurora Pink) |
Real SVG backdrop lens refraction, frosted blur, multi-edge specular highlight rims | switch glass |
💡 Note on
glass(Liquid Glass) Demo Preview:glassintroduces true SVG displacement map lens refraction and CSS aurora fluid mesh gradients. Since 2026-09-18 the pointer-following lens runs on a 2D-SDF optics engine ported from zsio/liquid-glass (Snell-law refraction profile, RGB dispersion, total internal reflection, rim-masked sheen): the lens centre is optically flat so text under it stays readable. Dark mode now uses a dark-tinted glass fill so inputs and cards are no longer washed out by bright wallpaper blobs. The bottom-right tuning panel exposes lens size / refraction / bevel / dispersion live. Still a Demo Preview.
- ⚡ Zero-Restart Hot Switching (0.1s)
- Powered by
switch.bat/switch-theme.ps1(Windows) andswitch.sh(macOS) communicating via Chromium's local DevTools port. - Switch between themes instantly without killing the application or repacking asar archives.
- Powered by
- 🏎️ 60Hz / 144Hz / 165Hz High-Refresh Pacing
- Eliminated redundant style recalculation bottlenecks caused by animated root
@propertyvariables. - Strictly mapped layout coordinates to physical device pixels (
calc(N * var(--px-dev))), preventing font resampling blur and animation frame drops.
- Eliminated redundant style recalculation bottlenecks caused by animated root
- 🪟 Seamless Titlebar Integration
- Eliminates Windows 11
titleBarOverlaytint discoloration and white background flash issues with custom self-drawn controls. - Native macOS traffic light window button integration.
- Eliminates Windows 11
- 🛡️ Non-Invasive & Safe Architecture
- Only a compact loader hook is placed inside
app.asar. All CSS stylesheets and WOFF2 fonts reside outside inresources/<theme>/. - Dynamic theme fallback allows adding any custom theme folder without touching injector code.
- Automatic
app.asar.pixel-backupcreation ensures complete uninstallation withuninstall.bat/uninstall.sh.
- Only a compact loader hook is placed inside
- OS: macOS (Apple Silicon / Intel) or Windows 10 / 11 (x64)
- App: Google Antigravity 2.x
- Dependency: Node.js (Node 18+,
nodeandnpxmust be available in PATH)
- Completely exit Antigravity (or use
-k/-KillRunningto auto-terminate); - Run installation in terminal:
# === macOS === ./install.sh -k # Or install specific theme: ./install.sh -t glass -k
# === Windows === powershell -ExecutionPolicy Bypass -File .\install.ps1 -KillRunning # Or install specific theme: powershell -ExecutionPolicy Bypass -File .\install.ps1 -Theme glass -KillRunning
Switch anytime from terminal or command prompt:
# === macOS ===
./switch.sh # Interactive number-based menu (1-5)
./switch.sh glass # Direct switch:: === Windows ===
switch :: Interactive number-based menu (1-5)
switch glass :: Direct switchTo restore official stock files:
# === macOS ===
./uninstall.sh -k# === Windows ===
powershell -ExecutionPolicy Bypass -File .\uninstall.ps1 -KillRunningantigravity-theme/
├── doodle-theme/ # Comic manga theme CSS & fonts
├── glass-theme/ # Liquid glass theme CSS & SVG refraction lenses [Demo]
├── matcha-theme/ # Japanese matcha stationery theme CSS & fonts
├── phantom-theme/ # Persona 5 pop-art theme CSS & fonts
├── pixel-theme/ # 8-Bit retro pixel theme CSS & fonts
├── patch/
│ └── pixelTheme.js # Core runtime theme injector & CDP hot-reload engine
├── install.bat / .ps1 / .sh # Automated patcher & asset deployer (Windows / macOS)
├── switch.bat / .ps1 / .sh # Instant zero-restart theme hot-switcher (Windows / macOS)
├── uninstall.bat / .ps1 / .sh # 100% clean restore & cleanup script (Windows / macOS)
├── 复用指南.md # In-depth technical architecture & reuse guide
└── README.md # Bilingual documentation
- Fonts: Fusion Pixel Font (
fusion-pixel-font) licensed under the SIL Open Font License 1.1. - Code & Themes: Licensed under the MIT License.
- Detailed technical insights and performance audit reports are available in
复用指南.md.