An almost like for like port of Derek Taylor's Popular shell-color-scripts package for PowerShell.
Painstakingly ported to PowerShell from the original Bash scripts, this module provides a collection of color scripts to brighten up your PowerShell terminal.
The module is available on the PowerShell Gallery and can be installed using the following command.
Install-Module -Name ps-color-scripts -Scope CurrentUser
Default: Display a random color script.
Show-ColorScript
Specific: Display a specific color script.
Show-ColorScript -Name "pacman"
List: List all available color scripts.
Show-ColorScript -List
$profilePath = $PROFILE.CurrentUserAllHosts
$profileExists = Test-Path -Path $profilePath
if (!$profileExists) {
New-Item -Path $PROFILE.CurrentUserAllHosts -ItemType File
}
Add-Content -Path $profilePath -Value "Show-ColorScript"
Tip
Replace Show-ColorScript
with Show-ColorScript -Name "[name]"
to display a specific color script, replacing [name]
with the name of the color script you wish to display.
Quickly display a random color script by typing scs
into your PowerShell terminal.
$profilePath = $PROFILE.CurrentUserAllHosts
$profileExists = Test-Path -Path $profilePath
if (!$profileExists) {
New-Item -Path $PROFILE.CurrentUserAllHosts -ItemType File
}
Add-Content -Path $profilePath -Value "New-Alias -Name scs -Value Show-ColorScript"
Tip
Replace scs
with your preferred alias. You can also run scs [name]
to display a specific color script, replacing [name]
with the name of the color script you wish to display.
Contributions, issues and feature requests are welcome! Try to keep contributions in the spirit of the original shell-color-scripts project. New scripts should use ANSI escape codes to colorize the output, ideally using 10 to 16 of the available colors (see ANSI escape code for more information).
Like its inspiration, this project is licensed under the MIT License. Feel free to use the code as you see fit.