Table of Contents

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

hex string

The hexadecimal color code.

color CliColor

When this method returns, contains the CliColor equivalent of the hexadecimal color code, if the conversion succeeded, or Default if the conversion failed.

Returns

bool

true if the conversion succeeded; otherwise, false.