@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 →
32 /100 Needs Attention
Development Activity 8
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

Go
73%
GPL 3.0

1Panel

Devops · Hosting Control Panel · Monitoring

37,044

The only open-source VPS control panel with native AI agent runtime — deploy websites, Docker stacks, and local LLMs from one web interface.

View details
91
Repo Health
76
Technical
67
Dependency
Built with
Go 73%
Vue 27%
Updated 4 days ago
Python
55%
Other

authentik

Authentication · Security

25,758

The self-hosted Identity Provider that replaces Okta, Auth0, and Entra ID with a unified SSO platform supporting SAML, OAuth2/OIDC, LDAP, RADIUS, and WebAuthn.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
Python 55%
TypeScript 36%
Updated 4 days ago
TypeScript
70%
Other

Budibase

Low Code Platforms · No Code Platforms

28,324

Build AI agents, automations, and internal apps on a single open-source platform with full self-hosting control.

View details
91
Repo Health
81
Technical
63
Dependency
Built with
TypeScript 70%
Svelte 26%
Updated 1 weeks ago
TypeScript
99%
Other

byterover-cli

AI Agents · AI Code Assistants · AI Memory

4,966

A portable memory layer for AI coding agents — curate structured project knowledge into a version-controlled context tree that syncs across tools, machines, and teammates.

View details
50
Repo Health
83
Technical
70
Dependency
Built with
TypeScript 99%
Updated 3 months ago
Java
34%
Apache 2.0

Enso

Analytics · Data Engineering · Low Code Platforms

7,441

A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.

View details
59
Repo Health
90
Technical
61
Dependency
Built with
Java 34%
TypeScript 27%
Scala 26%
Updated 1 months ago
TypeScript
64%
Other

Epicenter

Developer Tools · Knowledge Management · Note Taking

4,808

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
64
Dependency
Built with
TypeScript 64%
HTML 13%
Svelte 13%
Updated 5 days ago
Python
65%
MIT

Flowfile

Data Engineering

363

Visual ETL that compiles to Polars — build pipelines on a canvas, export as standalone Python, and run anywhere without platform lock-in.

View details
83
Repo Health
81
Technical
66
Dependency
Built with
Python 65%
Vue 17%
TypeScript 17%
Updated 5 days ago
TypeScript
51%
MIT

Ghost

Blogging · CMS

55,450

Open source headless Node.js CMS for professional publishing, paid memberships, and newsletters with a fully owned audience.

View details
96
Repo Health
85
Technical
67
Dependency
Built with
TypeScript 51%
JavaScript 44%
Updated 4 days ago
Rust
37%
Other

Hook0

Devops

1,491

Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.

View details
82
Repo Health
82
Technical
69
Dependency
Built with
Rust 37%
TypeScript 12%
Updated 1 weeks 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