C# Class WebApplications.Utilities.Formatting.ColorHelper

Afficher le fichier Open project: webappsuk/CoreLibraries

Private Properties

Свойство Type Description
GetName string

Méthodes publiques

Méthode Description
GetColor ( [ name ) : Optional

Gets the color corresponding to the name; otherwise returns Optional{Color}.Unassigned.

RemoveName ( [ name ) : Optional

Removes the custom color name.

SetName ( this color, [ name ) : void

Sets a custom name for the color.

ToColor ( this color ) : Color

Gets the Color of a ConsoleColor.

ToConsoleColor ( this color ) : ConsoleColor

Converts a Color to the nearest ConsoleColor.

Private Methods

Méthode Description
GetName ( this color ) : string

Method Details

GetColor() public static méthode

Gets the color corresponding to the name; otherwise returns Optional{Color}.Unassigned.
public static GetColor ( [ name ) : Optional
name [ The name.
Résultat Optional

RemoveName() public static méthode

Removes the custom color name.
public static RemoveName ( [ name ) : Optional
name [ The name.
Résultat Optional

SetName() public static méthode

Sets a custom name for the color.
public static SetName ( this color, [ name ) : void
color this The color.
name [ The name.
Résultat void

ToColor() public static méthode

Gets the Color of a ConsoleColor.
public static ToColor ( this color ) : Color
color this The color.
Résultat Color

ToConsoleColor() public static méthode

Converts a Color to the nearest ConsoleColor.
public static ToConsoleColor ( this color ) : ConsoleColor
color this The color.
Résultat ConsoleColor