external help file | Module Name | online version | schema |
---|---|---|---|
PSScriptTools-help.xml |
PSScriptTools |
2.0.0 |
Display an ANSI colored bar.
New-ANSIBar -Range <Int32[]> [-Spacing <Int32>] [-Character <String>]
[-Gradient] [<CommonParameters>]
New-ANSIBar -Range <Int32[]> [-Spacing <Int32>] [-Custom <Char>] [-Gradient]
[<CommonParameters>]
You can use this command to create colorful bars using ANSI escape sequences based on a 256 color scheme. The default behavior is to create a gradient bar that goes from first to last values in the range and then back down again. Or you can create a single gradient that runs from the beginning of the range to the end. You can use one of the default characters or specify a custom one.
You can learn more about ANSI escape codes at https://en.wikipedia.org/wiki/ANSI_escape_code.
PS C:\> New-ANSIBar -range (232..255)
This will create a grayscale gradient bar that goes from dark to light to dark.
PS C:\> New-ANSIBar -range (46..51) -Character BlackSquare -Spacing 3
PS C:\> New-ANSIBar -range (214..219) -Gradient -Spacing 5 -Character DarkShade
Specify a character to use for the bar.
Type: String
Parameter Sets: standard
Aliases:
Accepted values: FullBlock, LightShade, MediumShade, DarkShade, BlackSquare, WhiteSquare
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify a custom character.
Type: Char
Parameter Sets: custom
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Display as a single gradient from the first value to the last.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Enter a range of 256 color values, e.g. (232..255)
Type: Int32[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
How many characters do you want in the bar of each value? This will increase the overall length of the bar.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/