Oh My Posh Theme Palette Generator Scripts
PowerShell tooling for generating small Oh My Posh palette extensions without copying each complete theme.
Each complete Original theme lives at the repository root. Family folders contain 37 color-only configs whose extends target is that family’s independent root base. Atomic Custom and ExperimentalDividers remain separate.
📁 Files
scripts/New-ThemeWithPalette.ps1- Generate one palette-only extensionscripts/Generate-AllThemes.ps1- Generate extensions for the five main familiesscripts/Generate-ExperimentalDividers.ps1- Independently generate ExperimentalDividers extensionsscripts/Make-ExtendedVariant.ps1- Generate the Extended helper from canonical ExperimentalDividers plus ordered additionsscripts/Make-ColorCycleVariant.ps1- Generate Atomic Custom or ExperimentalDividers ColorCycle helpersscripts/Make-GradientVariant.ps1- Generate the Oh My Posh 29.36+ connected two-stop ExperimentalDividers Gradient helperscripts/Make-GradientRampsVariant.ps1- Generate the position-matched full-block ExperimentalDividers GradientRamps helperscripts/Make-GradientRampsAutoShadeVariant.ps1- Generate the v30 auto-shaded entry ExperimentalDividers GradientRamps helperscripts/Make-NoNetwork.ps1- Create an offline (no outbound network calls) variant of a themescripts/Test-Themes.ps1- Run repo theme validation tests (JSON/palette/network hygiene)color-palette-alternatives.json- Collection of themed color palettesCOLOR-PALETTES-GUIDE.md- Visual guide to all available palettes
🚀 Quick Start
Generate a Single Theme
# Generate Tokyo Night theme
.\scripts\New-ThemeWithPalette.ps1 -PaletteName "tokyo_night" -OutputName "TokyoNight" -UpdateAccentColor
# Generate Nord Frost theme
.\scripts\New-ThemeWithPalette.ps1 -PaletteName "nord_frost" -UpdateAccentColor
# Generate with custom palette object
$myPalette = @{
accent = "#ff0000"
blue_primary = "#0000ff"
# ... more colors
}
.\scripts\New-ThemeWithPalette.ps1 -PaletteObject $myPalette -OutputName "CustomTheme"
Generate ALL Themes at Once
# Generate all themes with updated accent colors
.\scripts\Generate-AllThemes.ps1 -UpdateAccentColor
# Force overwrite existing files
.\scripts\Generate-AllThemes.ps1 -UpdateAccentColor -Force
# Exclude an additional palette (`original` is always the root theme)
.\scripts\Generate-AllThemes.ps1 -ExcludePalettes @("test_palette")
# Regenerate standalone helper variants
.\scripts\Make-ExtendedVariant.ps1
.\scripts\Make-ColorCycleVariant.ps1
.\scripts\Make-ColorCycleVariant.ps1 -Source .\OhMyPosh-Atomic-Custom-ExperimentalDividers.json
.\scripts\Make-GradientVariant.ps1
.\scripts\Make-GradientRampsVariant.ps1
.\scripts\Make-GradientRampsAutoShadeVariant.ps1
📋 Script Parameters
New-ThemeWithPalette.ps1
| Parameter | Type | Description | Default |
|---|---|---|---|
-SourceTheme |
String | Source theme JSON file | OhMyPosh-Atomic-Custom.json |
-PaletteName |
String | Palette name from JSON file | (Required) |
-PaletteObject |
Object | Custom palette hashtable | (Alternative to PaletteName) |
-OutputName |
String | Name suffix for output file | Auto-generated from palette name |
-OutputPath |
String | Full output file path | Auto-generated |
-PalettesFile |
String | JSON file with palettes | color-palette-alternatives.json |
-ExtendsPath |
String | Explicit base path or URL | Relative path to SourceTheme |
-UpdateAccentColor |
Switch | Add an accent_color override |
$false |
Generate-AllThemes.ps1
| Parameter | Type | Description | Default |
|---|---|---|---|
-SourceThemes |
String[] | Source theme JSON file(s) | OhMyPosh-Atomic-Custom.json + other base templates |
-PalettesFile |
String | JSON file with palettes | color-palette-alternatives.json |
-OutputDirectory |
String | Output directory for themes | Family folders |
-UpdateAccentColor |
Switch | Add an accent_color override |
$false |
-ExcludePalettes |
String[] | Palettes to skip | @() |
-Force |
Switch | Overwrite existing files | $false |
-BaseUrl |
String | URL prefix for tracked overlay inheritance; empty uses relative paths | Raw GitHub main URL |
🎨 Available Palettes
The color-palette-alternatives.json file currently includes 38 palettes:
- original
- nord_frost
- gruvbox_dark
- dracula_night
- tokyo_night
- monokai_pro
- solarized_dark
- catppuccin_mocha
- forest_ember
- pink_paradise
- purple_reign
- red_alert
- blue_ocean
- green_matrix
- amber_sunset
- teal_cyan
- rainbow_bright
- christmas_cheer
- halloween_spooky
- easter_pastel
- fire_ice
- midnight_gold
- cherry_mint
- lavender_peach
- rose_pine
- one_dark
- ayu_mirage
- synthwave_84
- kanagawa_wave
- everforest
- night_owl
- cobalt2
- poimandres
- nightfox
- duskfox
- github_dark
- material_palenight
- catppuccin_frappe
See COLOR-PALETTES-GUIDE.md for visual previews and detailed descriptions.
📝 Examples
Example 1: Generate One Theme
# Generate a Dracula-themed variant
.\scripts\New-ThemeWithPalette.ps1 -PaletteName "dracula_night" -UpdateAccentColor
# Output: OhMyPosh-Atomic-Custom.DraculaNight.json
Example 2: Generate All Themes
# Generate complete collection
.\scripts\Generate-AllThemes.ps1 -UpdateAccentColor -Force
# Original remains: ./OhMyPosh-Atomic-Custom.json
# Creates overlays such as:
# - ./atomic/OhMyPosh-Atomic-Custom.NordFrost.json
# - ./atomic/OhMyPosh-Atomic-Custom.GruvboxDark.json
# - ./atomic/OhMyPosh-Atomic-Custom.DraculaNight.json
# - ./atomic/OhMyPosh-Atomic-Custom.TokyoNight.json
# - ./atomic/OhMyPosh-Atomic-Custom.MonokaiPro.json
# - ./atomic/OhMyPosh-Atomic-Custom.SolarizedDark.json
# - ./atomic/OhMyPosh-Atomic-Custom.CatppuccinMocha.json
# - ./atomic/OhMyPosh-Atomic-Custom.ForestEmber.json
Example 3: Custom Source and Output
# Use different source theme
.\scripts\New-ThemeWithPalette.ps1 `
-SourceTheme "MyCustomTheme.json" `
-PaletteName "tokyo_night" `
-OutputPath "C:\Themes\Tokyo.json" `
-UpdateAccentColor
Example 4: Create Custom Palette
# Define your own colors
$oceanPalette = @{
accent = "#00bcd4"
blue_primary = "#2196f3"
blue_time = "#03a9f4"
green_success = "#4caf50"
red_alert = "#f44336"
# ... (include all 67 color keys)
}
# Generate theme with custom palette
.\scripts\New-ThemeWithPalette.ps1 `
-PaletteObject $oceanPalette `
-OutputName "Ocean" `
-UpdateAccentColor
🔧 Using Your New Themes
Test a Theme (Temporary)
# Test Tokyo Night theme in current session
oh-my-posh init pwsh --config '.\atomic\OhMyPosh-Atomic-Custom.TokyoNight.json' | Invoke-Expression
Set Permanently
Add to your PowerShell profile ($PROFILE):
# Add this line to your profile
oh-my-posh init pwsh --config 'C:\Path\To\Themes\atomic\OhMyPosh-Atomic-Custom.TokyoNight.json' | Invoke-Expression
Edit your profile:
notepad $PROFILE
Switch Themes with a Function
Add to your profile for easy theme switching:
function Set-OhMyPoshTheme {
param(
[Parameter(Mandatory)]
[ValidateSet('Original','NordFrost','GruvboxDark','DraculaNight','TokyoNight','MonokaiPro','SolarizedDark','CatppuccinMocha','ForestEmber')]
[string]$Theme
)
$themePath = "C:\Path\To\Themes\atomic\OhMyPosh-Atomic-Custom.$Theme.json"
oh-my-posh init pwsh --config $themePath | Invoke-Expression
}
# Usage:
# Set-OhMyPoshTheme -Theme TokyoNight
# Set-OhMyPoshTheme -Theme NordFrost
🎯 Adding New Palettes
To add your own palette to the collection:
- Open
color-palette-alternatives.json - Add a new entry under
"palettes":
{
"palettes": {
"my_custom": {
"name": "My Custom Theme",
"description": "A unique theme with custom colors",
"palette": {
"accent": "#your-color",
"axios_yellow": "#your-color",
"black": "#your-color"
// ... all 67 color keys
}
}
}
}
- Generate the theme:
.\scripts\New-ThemeWithPalette.ps1 -PaletteName "my_custom" -UpdateAccentColor
📊 Palette Color Keys
Your theme requires these 67 color keys (all must be defined):
accent, axios_yellow, black, blue_primary, blue_time, blue_tooltip,
chart_teal, cyan_renamed, electron_red, eslint_purple, gray_os,
gray_os_fg, gray_path_fg, gray_prompt_count_bg, gray_prompt_count_fg,
gray_untracked, green_added, green_ahead, green_charging, green_full,
green_help, green_success, green_valid_line, ipify_purple,
ipify_purple_v6, java_blue, java_orange, magenta_copied, maroon_error,
navy_text, node_green, npm_yellow, npm_dark, orange, orange_battery,
orange_unmerged, pink_error_line, pink_status_fail, pink_storybook,
pink_weather, playwright_teal, prettier_yellow, prettier_black,
purple_ahead, purple_exec, purple_session, python_blue, python_yellow,
react_cyan, red_alert, red_deleted, tailwind_cyan, teal_sysinfo,
typescript_blue, typescript_eslint_pink, vite_yellow, vitest_green,
violet_project, white, windows_blue, yellow_bright, yellow_discharging,
yellow_git_changed, yellow_modified, yellow_root_alt, yellow_update,
zustand_purple
🛠️ Troubleshooting
“Source theme file not found”
- Ensure you’re in the correct directory
- Or provide full path:
-SourceTheme "C:\Full\Path\To\Theme.json"
“Palette not found”
- Check spelling (use underscores:
tokyo_nightnottokyo-night) - Run
Get-Content color-palette-alternatives.json | ConvertFrom-Json | Select-Object -ExpandProperty palettes | Get-Member -MemberType NotePropertyto list available palettes
“Failed to parse JSON”
- Verify your JSON syntax
- Use a JSON validator like https://jsonlint.com/
Colors don’t look right in terminal
- Ensure your terminal supports true color (24-bit)
- Try different terminal opacity settings
- Some colors look different in light vs dark environments
💡 Tips
- Test before committing: Try themes temporarily before setting permanently
- Time of day matters: Colors look different in daylight vs artificial light
- Terminal opacity: Transparent backgrounds affect color perception
- Multiple variants: Keep 2-3 favorites for different moods/times
- Backup originals: Keep your original theme file safe
📚 Related Files
OhMyPosh-Atomic-Custom.json- Your base themecolor-palette-alternatives.json- Palette definitionsCOLOR-PALETTES-GUIDE.md- Visual palette guide- Generated themes:
OhMyPosh-Atomic-Custom.*.json
🤝 Contributing
To add new palettes to the collection:
- Design your palette with all 67 colors
- Add to
color-palette-alternatives.json - Run
.\scripts\Generate-AllThemes.ps1 -Forceto regenerate all themes - Share your palette with the community!
📄 License
MIT License - Feel free to use, modify, and share!
Made with 💙 by GitHub Copilot
Happy theming! 🎨✨