The core theme definitions and generation engine for Black Atom Industries theme ecosystem
Black Atom Core is the central repository for all theme definitions in the Black Atom theme ecosystem. It serves as:
- The single source of truth for all theme colors and styling
- A theme generation engine that processes templates to create platform-specific theme files
- A command-line interface for theme management and generation
This modular architecture ensures consistent styling across all supported platforms while allowing for platform-specific optimizations through adapter repositories.
For details on our color token system, see COLOR_TOKEN_SYSTEM.md.
Black Atom includes multiple theme collections, each with its own distinct style:
Collection | Themes | Description |
---|---|---|
JPN | koyo-hiru, koyo-yoru, tsuki-yoru | Japanese-inspired themes |
Stations | engineering, operations, medical, research | Space station-inspired themes |
Terra | seasons (spring, summer, fall, winter) × time (day, night) | Earth season-inspired themes |
CRBN | null, supr | Minimalist carbon themes |
All themes are available in both dark and light variants.
- Deno runtime (version 1.37.0 or higher)
- Clone this repository:
git clone https://github.com/black-atom-industries/core.git
cd core
- Install the CLI globally:
deno task install
- Verify the installation:
black-atom-core --help
The black-atom-core
CLI provides the following commands:
# Display help information
black-atom-core --help
# Adapt theme files for the current adapter
black-atom-core adapt
# Adapt theme files for all adapters and commit changes
# NOTE: Requires all adapter repositories to be cloned as siblings under the same parent directory
# Example structure: ~/repos/black-atom-industries/{core,nvim,ghostty,zed,obsidian}
black-atom-core adapt-all
# List all available themes (Not available yet)
# black-atom-core list
# Show detailed information about a specific theme (Not available yet)
# black-atom-core info jpn/koyo-yoru
The core CLI adapts theme files by:
- Reading adapter configuration files (
black-atom-adapter.json
) - Processing template files with the Eta template engine
- Replacing template variables with values from core theme definitions
- Writing adapted files to the appropriate locations
# Navigate to an adapter repository
cd ../nvim
# Adapt theme files for this adapter
black-atom-core adapt
Black Atom uses an adapter pattern to support multiple platforms:
- Core Repository: Defines all theme colors and properties
- Adapter Repositories: Implement themes for specific platforms (Neovim, VS Code, terminals, etc.)
- Template Files: Transform core definitions into platform-specific formats
Each adapter repository contains:
- Template files (e.g.,
.template.lua
,.template.json
) - An
adapter.json
configuration file - Generated theme files
# Install dependencies
deno task deps
# Run typechecking
deno task check
# Run linter
deno task lint
# Format code
deno task format
# Generate JSON schema
deno task schema
# Update dependency lock file
deno task lock
# Compile binary
deno task compile
Themes are defined in TypeScript and follow a structured format:
export const theme: Theme = {
meta: {
name: "Theme Name",
description: "Theme description",
author: "Black Atom Industries",
},
appearance: "dark", // or "light"
primaries: {
accent: "#hexcolor",
// other primary colors
},
palette: {
// 16-color terminal palette
},
ui: uiDark, // or uiLight, imported from shared components
syntax: syntaxDark, // or syntaxLight, imported from shared components
};
To create a new theme:
- Create a new TypeScript file in the appropriate collection directory
- Define the theme structure following the
Theme
interface - Update the theme map in
config.ts
- Run typechecking and linting
Contributions are welcome! If you'd like to improve existing themes or add new features:
- Fork the repository
- Create a feature branch
- Make your changes
- Run typechecking and linting
- Create a pull request
MIT - See LICENSE for details