Asia/Shanghai
March 24, 2026

Cyberpunk Theme: Neon Glow for Obsidian and PDF

赛博朋克主题:给 Obsidian 和 PDF 加上霓虹灯

Mingjian Shao
Cyberpunk Theme: Neon Glow for Obsidian and PDF
Sometimes you want something more aggressive than clean minimalism. Neon glow, matrix-green terminals, cyberpunk grid backgrounds — this is that theme.
I already wrote about my OpenCode themes — a unified purple-cyan-teal palette for Obsidian and Typora. It's clean, professional, and I use it daily. But sometimes you want something more intense. Something that screams 2077 night city vibes.channingwalton's Typora Cyberpunk theme was the perfect inspiration. Aggressive neon, glitch effects, terminal aesthetics. So I ported it to Obsidian, then doubled down by adding Cyberpunk as a theme option in my md2pdf skill for PDF exports.The entire theme is built on these colors:
ColorHexUsage
Neon Pink#ff006eH1 glow, errors, warnings
Neon Cyan#00f5ffH2 glow, accent, links
Neon Purple#b300ffH3 glow, interactive elements
Matrix Green#39ff14H4 glow, code blocks, success states
Neon Yellow#ffed00H5 glow, highlights
Neon Orange#ff4500H6 glow, warnings
Cyber Black#0a0a0fBackground
Grid Cyan#1a1a2eBackground grid lines
Each heading level has a distinct color with text-shadow glow. You know exactly what level you're at by color alone.The port wasn't just a CSS copy-paste. Obsidian's live preview mode uses CodeMirror 6, which has different selectors than Typora's rendered HTML.Key features:
  • Neon glow headings: H1 through H6 each have their own color + text-shadow glow effect
  • Matrix-green code blocks: Terminal aesthetic with green text on near-black background
  • Cyberpunk grid background: Faint cyan grid lines (rgba(255,255,255,0.06) at 20px spacing)
  • Rainbow <hr>: Gradient horizontal rules using the full neon palette
  • [ CODE ] badge: Reading view shows a badge before code blocks
  • Heading prefixes: , //, >, :: before headings in reading view (CodeMirror limitation — live preview doesn't support ::before pseudo-elements on .HyperMD-header-*)
  • Rajdhani font: Google Fonts via @import for that squared-off tech look
What I tried and rejected: Orbitron font. Looks amazing in English, absolutely terrible with CJK text. Stuck with Rajdhani + system fallbacks.Obsidian's live preview mode is CodeMirror 6, which means:
  • Header wrappers: .cm-s-obsidian .HyperMD-header-N for the wrapper element
  • Inline spans: .cm-header-N for the actual text span
  • Both need styling: You must target both selectors for consistent rendering
  • ::before limitation: Pseudo-elements don't work on .HyperMD-header-* in live preview — they only work in reading mode
The Typora original used ::before extensively for heading prefixes. I had to duplicate styles for both CodeMirror selectors and accept that prefixes only show in reading mode.My md2pdf skill already supported an OpenCode dark theme. Adding Cyberpunk was straightforward — just another CSS template in the Python script.Usage:
Bash
python md2pdf.py input.md --theme cyberpunk
The PDF export uses the same neon palette, grid background, and matrix-green code blocks. Perfect for exporting design docs that need to match your Obsidian aesthetic.
Bash
# Clone or download from GitHub
git clone https://github.com/nxxxsooo/obsidian-cyberpunk-theme
# Copy theme.css to your vault
cp obsidian-cyberpunk-theme/theme.css ~/.obsidian/themes/Cyberpunk/
# Enable in Obsidian: Settings → Appearance → Community Themes → Cyberpunk
The md2pdf script lives at ~/.agents/skills/md2pdf/scripts/md2pdf.py. The Cyberpunk theme is already included — just use --theme cyberpunk.
Bash
# Dark mode (default)
python md2pdf.py doc.md

# Cyberpunk theme
python md2pdf.py doc.md --theme cyberpunk

# Light mode for printing
python md2pdf.py doc.md --light
Once the PR is merged, you'll be able to install directly from Obsidian's Community Themes browser.If you use an AI coding assistant like OpenCode, paste this prompt and let it handle everything:
Markdown
I want to install the Cyberpunk theme for Obsidian and set up md2pdf with Cyberpunk support.
Reference: https://mjshao.fun/blog/obsidian-cyberpunk-theme

My setup:
- Obsidian vault path: [ask me]
- Want md2pdf too: [yes/no]

Steps:
1. Clone https://github.com/nxxxsooo/obsidian-cyberpunk-theme
2. Copy theme.css to vault/.obsidian/themes/Cyberpunk/
3. Enable theme in Obsidian settings (or edit .obsidian/appearance.json)
4. If md2pdf requested: verify ~/.agents/skills/md2pdf/scripts/md2pdf.py has cyberpunk theme
5. Test with: python md2pdf.py test.md --theme cyberpunk
6. Show me how to switch themes in Obsidian
有时候你就是想要点更激进的东西。霓虹灯、矩阵绿终端、赛博朋克网格背景——这就是那个主题。
我已经写过 OpenCode 主题——一套用于 Obsidian 和 Typora 的紫 - 青 - 绿配色方案。它干净、专业,我每天都在用。但有时候你想要更强烈的东西。那种能尖叫出 2077 夜城氛围的东西。channingwalton 的 Typora 赛博朋克主题是完美的灵感来源。激进的霓虹灯、故障效果、终端美学。所以我把它移植到了 Obsidian,然后又在我的 md2pdf skill 里加了赛博朋克主题选项用来导出 PDF。整个主题基于这些颜色:
颜色Hex用途
霓虹粉#ff006eH1 发光、错误、警告
霓虹青#00f5ffH2 发光、强调、链接
霓虹紫#b300ffH3 发光、交互元素
矩阵绿#39ff14H4 发光、代码块、成功状态
霓虹黄#ffed00H5 发光、高亮
霓虹橙#ff4500H6 发光、警告
赛博黑#0a0a0f背景
网格青#1a1a2e背景网格线
每个标题级别都有自己的颜色加上 text-shadow 发光效果。光看颜色就知道自己在哪个层级。这个移植不是简单的 CSS 复制粘贴。Obsidian 的实时预览模式用的是 CodeMirror 6,它的选择器和 Typora 的渲染 HTML 不一样。核心功能:
  • 霓虹发光标题:H1 到 H6 各有专属颜色 + text-shadow 发光效果
  • 矩阵绿代码块:终端美学,近黑背景上的绿色文字
  • 赛博朋克网格背景:淡青色网格线(rgba(255,255,255,0.06),20px 间距)
  • 彩虹 <hr>:用全套霓虹配色的渐变水平线
  • [ CODE ] 徽章:阅读模式下代码块前显示徽章
  • 标题前缀:阅读模式下标题前有 //>::(CodeMirror 限制——实时预览不支持在 .HyperMD-header-* 上用 ::before 伪元素)
  • Rajdhani 字体:通过 @import 加载 Google Fonts,营造方形科技感
  • 尝试后放弃的:Orbitron 字体。英文看着很赞,但配中文字体灾难级。最后还是用 Rajdhani + 系统回退。
Obsidian 的实时预览模式是 CodeMirror 6,这意味着:
  • 标题包装器.cm-s-obsidian .HyperMD-header-N 用于包装元素
  • 行内 span.cm-header-N 用于实际文本 span
  • 两个都要样式:必须同时 targeting 两个选择器才能保证渲染一致
  • ::before 限制:伪元素在实时预览的 .HyperMD-header-* 上不工作——它们只在阅读模式下有效
Typora 原版大量使用 ::before 做标题前缀。我不得不为两个 CodeMirror 选择器复制样式,然后接受前缀只在阅读模式显示。我的 md2pdf skill 已经支持 OpenCode 深色主题。添加赛博朋克很简单——在 Python 脚本里再加一个 CSS 模板。用法:
Bash
python md2pdf.py input.md --theme cyberpunk
PDF 导出用同样的霓虹配色、网格背景、矩阵绿代码块。完美匹配你的 Obsidian 美学来导出设计文档。
Bash
# 从 GitHub 克隆或下载
git clone https://github.com/nxxxsooo/obsidian-cyberpunk-theme
# 复制 theme.css 到你的 vault
cp obsidian-cyberpunk-theme/theme.css ~/.obsidian/themes/Cyberpunk/
# 在 Obsidian 中启用:设置 → 外观 → 社区主题 → Cyberpunk
md2pdf 脚本在 ~/.agents/skills/md2pdf/scripts/md2pdf.py。赛博朋克主题已经内置——用 --theme cyberpunk 就行。
Bash
# 深色模式(默认)
python md2pdf.py doc.md

# 赛博朋克主题
python md2pdf.py doc.md --theme cyberpunk

# 打印用的浅色模式
python md2pdf.py doc.md --light
PR 合并后,你就可以直接从 Obsidian 的社区主题浏览器里安装了。如果你用 AI 编码助手比如 OpenCode,粘贴这个提示词让它自动搞定:
Markdown
我想给 Obsidian 安装赛博朋克主题,并设置支持赛博朋克主题的 md2pdf。
参考:https://mjshao.fun/blog/obsidian-cyberpunk-theme

我的配置:
- Obsidian vault 路径:[问我]
- 也需要 md2pdf:[是/否]

步骤:
1. 克隆 https://github.com/nxxxsooo/obsidian-cyberpunk-theme
2. 复制 theme.css 到 vault/.obsidian/themes/Cyberpunk/
3. 在 Obsidian 设置中启用主题(或编辑 .obsidian/appearance.json)
4. 如果需要 md2pdf:确认 ~/.agents/skills/md2pdf/scripts/md2pdf.py 有 cyberpunk 主题
5. 测试:python md2pdf.py test.md --theme cyberpunk
6. 告诉我怎么在 Obsidian 里切换主题
Share this post:
Enjoy this post? Subscribe via RSS: English | 中文