Class NamedColors
Contains methods and properties which allow to work with named colors.
public static class NamedColors
- Inheritance
-
NamedColors
Methods
- GetColorOrDefault(string, Color)
Returns a color by its name or
defaultValue
if no color is registered for the specified name.
- GetColorOrDefault(string, Func<Color>)
Returns a color by its name or a result of
defaultFunc
call if no color is registered for the specified name.
- GetColorOrEmpty(string)
Returns a color by its name or Empty if no color is registered for the specified name.
- GetColorOrException(string)
Gets a color by its name or raises an exception if no color is registered for the specified name.
- GetColorOrNull(string)
Returns a color by its name or
null
if no color is registered for the specified name.
- IsRegistered(string)
Gets whether specified color name is registered.
- RegisterColor(string, Color)
Registers color name for use in string to color conversions.
- RegisterColor(string, Func<Color>)
Registers color name for use in string to color conversions.