Official

themes

The stock themes: presets of every colour, type size, corner and density token, chosen per light and dark mode and edited in Settings.

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: cvg install convergence/themes@0.3.0

Permissions in 0.3.0

  • Change app settings settings.writeHighChanges the app settings.Apply the chosen theme to the window

Files

presets.test.ts2.3 KB
// The presets and the settings that pick them, without the plugin API.
import assert from "node:assert/strict";
import test from "node:test";
import { allPresets, chosen, duplicate, readSettings, STOCK } from "./settings-model.ts";

test("every stock preset is unique and names its mode", () => {
  const ids = STOCK.map((preset) => preset.id);
  assert.equal(new Set(ids).size, ids.length);
  for (const preset of STOCK) assert.equal(preset.tokens.mode, preset.mode);
  for (const family of ["convergence", "vscode", "high-contrast", "compact"])
    for (const mode of ["light", "dark"]) assert.ok(ids.includes(`${family}-${mode}`), `${family}-${mode}`);
  assert.equal(STOCK.find((preset) => preset.id === "convergence-dark")!.name, "Divergence Dark");
  assert.equal(STOCK.find((preset) => preset.id === "convergence-light")!.name, "Divergence Light");
});

test("a mode without a choice, or with a gone one, draws the Divergence preset", () => {
  assert.equal(chosen({ presets: {}, active: {} }, "dark").id, "convergence-dark");
  assert.equal(chosen({ presets: {}, active: { light: "deleted" } }, "light").id, "convergence-light");
  assert.equal(chosen({ presets: {}, active: { dark: "vscode-dark" } }, "dark").id, "vscode-dark");
  // A preset of the other mode is not drawn for this one.
  assert.equal(chosen({ presets: {}, active: { dark: "vscode-light" } }, "dark").id, "convergence-dark");
});

test("a duplicate is a user preset with an id of its own", () => {
  const source = STOCK.find((preset) => preset.id === "vscode-dark")!;
  const copy = duplicate(source, "VS Code Dark Modern copy", ["vs-code-dark-modern-copy"]);
  assert.equal(copy.id, "vs-code-dark-modern-copy-2");
  assert.equal(copy.mode, "dark");
  assert.equal(copy.stock, undefined);
  assert.equal(copy.tokens.name, "VS Code Dark Modern copy");
  assert.notEqual(copy.tokens.colors, source.tokens.colors, "the copy's tokens are its own");
});

test("a malformed settings file keeps what is well formed", () => {
  const settings = readSettings({
    presets: { good: { name: "Mine", mode: "dark", tokens: {} }, bad: { name: 3 } },
    active: "nonsense",
  });
  assert.deepEqual(Object.keys(settings.presets), ["good"]);
  assert.deepEqual(settings.active, {});
  assert.equal(allPresets(settings).at(-1)?.id, "good");
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.3.0latestOct 5, 2026>=2 <37.9 KB1 permissionListed

Reviews and comments

0 threads · 0 reviews

No comments yet.