small fixes
This commit is contained in:
parent
32bc8274a2
commit
2a796509c8
7 changed files with 60 additions and 36 deletions
|
@ -18,10 +18,12 @@ namespace Sledgemapper
|
|||
|
||||
public static Color ToColor(this string s)
|
||||
{
|
||||
System.Console.WriteLine(s);
|
||||
var hexs = s.TrimStart('#').Split(2).ToArray();
|
||||
var color = new Color(int.Parse(hexs[0], System.Globalization.NumberStyles.HexNumber),
|
||||
int.Parse(hexs[1], System.Globalization.NumberStyles.HexNumber),
|
||||
int.Parse(hexs[2], System.Globalization.NumberStyles.HexNumber));
|
||||
System.Console.WriteLine(color);
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue