Summary
A Helper class for the Color-Struct
- Namespace
- MahApps
.Metro .Controls - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["ColorHelper"]
class Type type-node
Syntax
public static class ColorHelper
Properties
Name | Value | Summary |
---|---|---|
ColorNamesDictionary | Dictionary |
A Dictionary with localized Color Names
static
|
Methods
Name | Value | Summary |
---|---|---|
ColorFromString |
Color? |
This function tries to convert a given string into a Color in the following order:
1. If the string starts with '#' the function tries to get the color from the hex-code
2. else the function tries to find the color in the color names Dictionary
3. If 1. + 2. were not successful the function adds a '#' sign and tries 1. + 2. again
static
|
ColorFromString |
Color? |
This function tries to convert a given string into a Color in the following order:
1. If the string starts with '#' the function tries to get the color from the hex-code
2. else the function tries to find the color in the default
ColorNamesDictionary
3. If 1. + 2. were not successful the function adds a '#' sign and tries 1. + 2. again
static
|
GetColorName |
string |
Searches for the localized name of a given color
static
|
GetColorName |
string |
Searches for the localized name of a given color by using the default
ColorNamesDictionary
static
|