CliColor.TryFromHex Method
Definition
- Namespace
- DotMake.CommandLine
- Assembly
- DotMake.CommandLine.dll
Tries to convert a hexadecimal color code to a CliColor object.
public static bool TryFromHex(string hex, out CliColor color)
Parameters
hexstringThe hexadecimal color code.
colorCliColorWhen this method returns, contains the CliColor equivalent of the hexadecimal color code, if the conversion succeeded, or Default if the conversion failed.
Returns
- bool
trueif the conversion succeeded; otherwise,false.