Thank you for your interest in contributing themes to Hone!
- Download the theme's
.jsonfile from its VSCode extension source. - Run the importer:
tsx tools/import-vscode-theme.ts path/to/original.json themes/my-theme.json
- Review the output and adjust any Hone-specific UI colors (see below).
- Validate and run tests.
- Obtain the
.tmThemefile. - Run the importer:
tsx tools/import-tmtheme.ts path/to/theme.tmTheme themes/my-theme.json
- Review the generated UI colors (derived automatically from the palette).
- Validate and run tests.
- Copy
themes/hone-dark.json(orhone-light.json) as a starting point. - Edit the color values.
- Validate and run tests.
Every theme must:
- Validate against
schema/theme-schema.json - Define all required UI color keys (see schema
requiredlist) - Cover the minimum token scopes:
comment,string,constant.numeric,keyword,entity.name.function,entity.name.type,variable,punctuation
- Use hex color values only (
#RRGGBBor#RRGGBBAA) - Have
typeset to"dark"or"light" - Meet a minimum editor foreground/background contrast ratio of 3:1 (WCAG AA requires 4.5:1)
- Include a
semanticHighlightingfield andsemanticTokenColorsmap
For community ports, add an attribution field citing the original author and license.
Hone has UI elements not present in standard VSCode themes. Ensure these are set:
| Key | Description |
|---|---|
commandPalette.background |
Command palette panel background |
commandPalette.foreground |
Command palette text |
These are usually derived from quickInput.background / quickInput.foreground in the original VSCode theme, or fall back to editor.background / editor.foreground.
tsx tools/validate-theme.ts themes/my-theme.jsonThis checks:
- JSON schema conformance
- Required UI colors present
- All color values are valid hex
- Token scope coverage
- WCAG contrast ratios
tsx tools/preview-theme.ts themes/my-theme.jsonOpens my-theme.preview.html in your browser to visually inspect the theme.
npm testAll themes in themes/ are automatically picked up by the test suite.
By contributing a theme, you agree that your contribution is licensed under the MIT License. For community ports, ensure the original theme's license permits redistribution (most popular themes use MIT).
- Use 2-space indentation in JSON files
- Keep color hex values lowercase (
#1e1e2e, not#1E1E2E) - Provide an
attributionfield for any ported theme - Name the theme file using kebab-case matching the theme
namefield