Skip to content

Instantly share code, notes, and snippets.

@gpduck
Created February 28, 2020 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gpduck/0e42b7efa03ac91b80110067479da570 to your computer and use it in GitHub Desktop.
Save gpduck/0e42b7efa03ac91b80110067479da570 to your computer and use it in GitHub Desktop.
#This only works in PowerShell 6 and 7 as lower versions don't support -AsHashtable
$Dracula = convertfrom-json -AsHashtable @"
{
"background" : "#282A36",
"black" : "#21222C",
"blue" : "#BD93F9",
"brightBlack" : "#6272A4",
"brightBlue" : "#D6ACFF",
"brightCyan" : "#A4FFFF",
"brightGreen" : "#69FF94",
"brightPurple" : "#FF92DF",
"brightRed" : "#FF6E6E",
"brightWhite" : "#FFFFFF",
"brightYellow" : "#FFFFA5",
"cyan" : "#8BE9FD",
"foreground" : "#F8F8F2",
"green" : "#50FA7B",
"name" : "Dracula",
"purple" : "#FF79C6",
"red" : "#FF5555",
"white" : "#F8F8F2",
"yellow" : "#F1FA8C"
}
"@
Import-Module MSTerminalSettings
#Import the new color scheme (note the name is specified in the JSON above)
New-MSTerminalColorScheme @Dracula
#Set the PowerShell Core profile to use the new color scheme
Set-MSTerminalProfile -Name "PowerShell Core" -ColorScheme Dracula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment