@codemirror/theme-one-dark

The One Dark color theme, ported as a ready-to-use CodeMirror 6 extension

Library
npm
v6.1.3
82 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
31 /100 Needs Attention
Development Activity 4
Maintenance 0
Community 40
Maturity 60
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
63 /100 Good
Architecture 65
Code Quality 62
Innovation 40
Learning Curve 85

@codemirror/theme-one-dark packages the popular One Dark color scheme (originally from the vscode-one-dark-theme project) as a drop-in CodeMirror 6 extension. It exports a single oneDark extension that bundles both the editor chrome styling (oneDarkTheme, built with EditorView.theme()) and the token-level syntax highlighting (oneDarkHighlightStyle, built with @codemirror/language’s HighlightStyle against Lezer’s standard tags), so adding dark-mode syntax highlighting to an editor is a single line of configuration.

The package also exports its raw color palette object, letting consumers reuse the same hex values (chalky, coral, cyan, malibu, sage, and others) to build custom UI around the editor that visually matches the theme.

What You Get

  • A single oneDark extension combining editor-chrome theming and syntax highlighting, ready to add to a CodeMirror 6 EditorState
  • oneDarkTheme, the editor-chrome styles alone, for consumers who want to pair it with a different highlight style
  • oneDarkHighlightStyle, the syntax-token color mapping alone, built against Lezer’s standard highlighting tags
  • An exported color object with all the theme’s raw hex values for building matching custom UI around the editor

Common Use Cases

  • Adding a polished, widely-recognized dark theme to a CodeMirror 6-based code editor with a single extension
  • Building developer tools, playgrounds, or documentation sites that want visual parity with VS Code’s popular One Dark theme
  • Reusing the theme’s exported color palette to style surrounding editor chrome (toolbars, panels) to match the editor itself
  • Serving as a reference implementation for developers writing their own custom CodeMirror 6 theme extensions

Under The Hood

Architecture: The entire package is a single ~150-line file, src/one-dark.ts, split into three exports: a color constant object holding named hex values, oneDarkTheme (an EditorView.theme() call mapping CSS selectors like .cm-content, .cm-selectionBackground, and .cm-panels to those colors), and oneDarkHighlightStyle (a HighlightStyle.define() call mapping Lezer’s semantic highlight tags — keywords, strings, comments, etc. — to colors and font styles); oneDark is simply [oneDarkTheme, syntaxHighlighting(oneDarkHighlightStyle)], composing both into one Extension array. Tech Stack: TypeScript compiled via the shared CodeMirror build tooling (cm-buildhelper), with @codemirror/view, @codemirror/state, @codemirror/language, and @lezer/highlight as its only dependencies — all core CodeMirror 6 packages, meaning this theme package builds entirely on public, stable APIs. Code Quality: Being a static style-mapping module rather than executable logic, there isn’t traditional branching to unit-test; correctness is validated through the shared cm-runtests harness used across CodeMirror packages and, in practice, visually by comparison against the reference vscode-one-dark-theme project cited directly in a source comment. API Design: The three-tier export (oneDark for the common case, oneDarkTheme/oneDarkHighlightStyle for consumers who want to mix and match, plus the raw color palette) is a clean, minimal-boilerplate pattern that other CodeMirror theme packages in the ecosystem follow, making it easy to use as-is or as a template for authoring a custom theme.

Used by 23 apps in this directory

TypeScript
91%
Apache 2.0

HyperFrames

AI Design Tools · AI Development

70,938

Turn plain HTML and CSS into deterministic, pixel-perfect MP4 videos — authored by humans or AI agents, rendered by headless Chrome and FFmpeg.

View details
84
Repo Health
83
Technical
65
Dependency
Built with
TypeScript 91%
Updated 6 days ago
Python
62%
Apache 2.0

marimo

Data Engineering · Developer Tools

23,309

A reactive Python notebook that eliminates hidden state, runs reproducibly, and deploys as a web app or script — stored as pure Python, built for the AI era.

View details
90
Repo Health
91
Technical
65
Dependency
Built with
Python 62%
TypeScript 37%
Updated 6 days ago
Python
45%
GPL 3.0

MaxKB

AI Development · Knowledge Management

23,022

Build enterprise-grade AI agents with RAG, workflows & multi-modal support

View details
92
Repo Health
68
Technical
66
Dependency
Built with
Python 45%
Vue 37%
TypeScript 17%
Updated 1 weeks ago
Go
67%
MIT

nginx ignition

Developer Tools · Devops

2,141

A modern web UI for nginx that eliminates config file editing with visual virtual hosts, SSL automation, Docker integrations, and real-time traffic analytics.

View details
74
Repo Health
80
Technical
67
Dependency
Built with
Go 67%
TypeScript 28%
Updated 2 weeks ago
TypeScript
99%
Other

NocoBase

Low Code Platforms · No Code Platforms

24,686

Open-source AI + no-code platform that lets coding agents and people collaborate to build business systems fast on proven infrastructure.

View details
94
Repo Health
81
Technical
63
Dependency
Built with
TypeScript 99%
Updated 6 days ago
Ruby
63%
MIT

OnetimeSecret

Security

2,970

Generate self-destructing single-use links to share passwords and sensitive data without leaving traces in inboxes or chat logs.

View details
92
Repo Health
81
Technical
72
Dependency
Built with
Ruby 63%
TypeScript 24%
Updated 6 days ago
Python
38%
Other

Open WebUI

AI Agents · AI Assistants

156,607

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
92
Repo Health
75
Technical
66
Dependency
Built with
Python 38%
Svelte 35%
JavaScript 19%
Updated 6 days ago
TypeScript
91%
AGPL 3.0

OpenPanel

Analytics

7,187

Open-source Mixpanel alternative with session replay, MCP integration, and privacy-first product analytics you fully control.

View details
83
Repo Health
74
Technical
64
Dependency
Built with
TypeScript 91%
Updated 1 weeks ago
Python
73%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

40,705

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 73%
TypeScript 12%
Rust 11%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers