Skip to content

Set-SpectreColors

Description

This function sets the accent color and default value color for Spectre Console. The accent color is used for highlighting important information, while the default value color is used for displaying default values.


Examples

Example 1
This example demonstrates how to set the accent color and default value color for Spectre Console.

Terminal window
Write-SpectreRule "This is a default rule"
Set-SpectreColors -AccentColor "Turquoise2"
Write-SpectreRule "This is a Turquoise2 rule"
Write-SpectreRule "This is a rule with a specified color" -Color "Yellow"

Parameters

AccentColor

The accent color to set. Must be a valid Spectre Console color name. Defaults to “Blue”.

TypeRequiredPositionPipelineInput
[Color]false1false

DefaultValueColor

The default value color to set. Must be a valid Spectre Console color name. Defaults to “Grey”.

TypeRequiredPositionPipelineInput
[Color]false2false

DefaultTableHeaderColor

The default table header color to set. Must be a valid Spectre Console color name. Defaults to “Default” which will be the standard console foreground color.

TypeRequiredPositionPipelineInput
[Color]false3false

DefaultTableTextColor

The default table text color to set. Must be a valid Spectre Console color name. Defaults to “Default” which will be the standard console foreground color.

TypeRequiredPositionPipelineInput
[Color]false4false

Syntax

Terminal window
Set-SpectreColors [[-AccentColor] <Color>] [[-DefaultValueColor] <Color>] [[-DefaultTableHeaderColor] <Color>] [[-DefaultTableTextColor] <Color>] [<CommonParameters>]