Skip to content

[feat] tui: monokai wears Monokai Pro's palette - #179

Merged
gogoout merged 2 commits into
mainfrom
feat/monokai-pro-main
Sep 27, 2026
Merged

gogoout merged 2 commits into
mainfrom
feat/monokai-pro-main

Conversation

@gogoout

@gogoout gogoout commented Sep 26, 2026

Copy link
Copy Markdown
Member

Recreates #176, which was squash-merged into fix/157-stock-palettes instead of main. The content is identical to what #176 merged. #176 has the review thread.

Why

After #175, classic Monokai sits on its stock olive ground #272822. Every grey mixed from that ground takes the olive too, and the yellow-green addition tint is close to its hue. So a screen of additions reads as green. The monokai theme now wears Monokai Pro's warm-grey palette instead.

What changes

  • monokai is Monokai Pro. The config name stays the same, so existing theme = "monokai" configs keep working. Classic Monokai is no longer shipped. A reader on monokai will see a different palette after upgrading.
  • A seed can bundle its syntax theme. Seed::syntax is now a Syntax: Embedded (a two-face name, as before) or Bundled (a .tmTheme compiled in with include_bytes! and parsed by syntect's ThemeSet::load_from_reader). Nothing is loaded at run time. two-face does not ship Monokai Pro, which is why this is needed (ADR 0040).
  • monokai.tmTheme is written for this crate. It uses Monokai Pro's published palette values only. No official or ported theme file is copied, and the docs say the crate is not affiliated with Monokai Pro. The scope mapping is our own.
  • Seed values:
    • The blue is lifted from #78DCE8 to #6CD9E8, which clears the chroma floor, as Dracula's cyan was lifted.
    • The orange #FC9867 is the search fill, so the fill and the yellow skim tier are two different colours.
    • The theme's own line numbers #939293 are used.
    • The comment colour #727072 is under 3:1 on the ground, so the noise tier uses the mix.

Tests

  • cargo test, clippy -D warnings and fmt are clean.
  • every_named_theme_builds parses the bundled file, and the legibility, chroma, distinctness and own-colour tests all run over it.
  • The .tmTheme is included in the cargo package file list.
  • assets/themes/monokai.png is regenerated.

Classic Monokai, matched to its stock olive ground, reads as green: every
grey mixed from that ground takes the olive, and the yellow-green addition
tint sits right beside it. The `monokai` theme now wears Monokai Pro's
warm-grey palette instead, under the same name, so existing configs keep
working. Classic Monokai is no longer shipped.

two-face does not ship Monokai Pro, so a seed's syntax theme is now a
`Syntax`: a two-face name as before, or a `.tmTheme` compiled into the
crate and parsed by syntect. `monokai.tmTheme` is written here from Monokai
Pro's published palette values alone; no official or ported theme file is
copied, and the crate is not affiliated with Monokai Pro (ADR 0040). Its
blue is lifted to clear the chroma floor, as Dracula's cyan was, and its
orange is the search fill so the fill and the skim tier are two colours.
Review follow-up. derive() takes the search fill from the seed, so the
file's findHighlight is inert, but it said yellow where the seed says
orange. They agree now.
@gogoout
gogoout added this pull request to stack #181 September 27, 2026 00:11
@gogoout
gogoout merged commit 77a9c31 into main Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant