OhMyPosh-Atomic-Enhanced

OhMyPosh-Atomic-Enhanced made by Typpi / Nick2bad4u

View on GitHub

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

🚀 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:

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:

  1. Open color-palette-alternatives.json
  2. 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
   }
  }
 }
}
  1. 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”

“Palette not found”

“Failed to parse JSON”

Colors don’t look right in terminal

💡 Tips

🤝 Contributing

To add new palettes to the collection:

  1. Design your palette with all 67 colors
  2. Add to color-palette-alternatives.json
  3. Run .\scripts\Generate-AllThemes.ps1 -Force to regenerate all themes
  4. Share your palette with the community!

📄 License

MIT License - Feel free to use, modify, and share!


Made with 💙 by GitHub Copilot

Happy theming! 🎨✨