external help file | Module Name | online version | schema |
---|---|---|---|
Pansies-help.xml |
Pansies |
2.0.0 |
Get a range of colors between two colors
Get-Gradient [-StartColor] <RgbColor> [-EndColor] <RgbColor> [[-Width] <Int32>] [[-Height] <Int32>] [[-ColorSpace] <Object>] [-Reverse] [-Flatten]
Get an array (or multiple arrays, one per line) of RgbColor values for a gradient from the start Color to the end Color.
PS C:\> Get-Gradient Red Blue -Count 10 -Flatten
Gets a simple array of ten colors between Red and Blue.
PS C:\> Get-Gradient Red Blue
Gets a 2D gradient from the ConsoleColor Red to Blue, with as many colors as the current width of the console.
The left color to start the gradient from.
Type: RgbColor
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The right color to end the gradient at.
Type: RgbColor
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The number of columns to generate in the gradient. Defaults to the width of the console.
Type: Int32
Parameter Sets: (All)
Aliases: Length, Count, Steps
Required: False
Position: 3
Default value: $Host.UI.RawUI.WindowSize.Width
Accept pipeline input: False
Accept wildcard characters: False
The number of rows to generate in the gradient. Defaults to 1
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: $Host.UI.RawUI.WindowSize.Height
Accept pipeline input: False
Accept wildcard characters: False
A color space to render the gradient in. Defaults to HunterLab, which generates gradients that are very consistent in their brightness, but can be any of CMY, CMYK, LAB, LCH, LUV, HunterLAB, HSL, HSV, HSB, RGB, XYZ, YXY
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: HunterLab
Accept pipeline input: False
Accept wildcard characters: False
For color spaces with Hue (HSL, HSV, HSB), setting this generates the gradient the long way, creating a rainbow effect.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Flattens the 2D array to a single array.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
You must pass a start and end RgbColor
With -Flatten, returns a simple array of colors between the start and end color
Otherwise, returns a two dimensional array of colors of the specified height and width