Which color formats does New-PSUTag support?

Product: PowerShell Universal
Version: 2.8.1

Is there a list of all color keywords and formats :art: that are accepted by the color parameter of New-PSUTag?

For example “gray” or “grey” :thinking:

More

The RGB is accepted in hex format (e.g. #FFFFFF) and basic colors like “yellow” but what other possibilities are there? How can we validate that we are only passing the correct values to the color parameter?

Thank you!

We use AntD tags so you can use their presents and then any hex value.

1 Like

Hi Adam,

Thank you for the hint! I was able to find the list of names.

The context here was adding a regex for a PWU setup script that I am working on that ensures only recognized values are passed to the color parameter of New-PSUTag. Below is what I came up with in case it is interesting for anyone.

(?i)^((red)|(orange)|(volcano)|(gold)|(yellow)|(lime)|(green)|(cyan)|(blue)|(geekblue)|(purple)|(magenta)|(grey)|(white)|(black)|(transparent))|(#[0-9A-F]{6})$

1 Like