-
Notifications
You must be signed in to change notification settings - Fork 35
/
Color.cs
88 lines (83 loc) · 3.09 KB
/
Color.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCForge)
Dual-licensed under the Educational Community License, Version 2.0 and
the GNU General Public License, Version 3 (the "Licenses"); you may
not use this file except in compliance with the Licenses. You may
obtain a copy of the Licenses at
http://www.osedu.org/licenses/ECL-2.0
http://www.gnu.org/licenses/gpl-3.0.html
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the Licenses for the specific language governing
permissions and limitations under the Licenses.
*/
using System;
namespace MCForge
{
public static class c
{
public const string black = "&0";
public const string navy = "&1";
public const string green = "&2";
public const string teal = "&3";
public const string maroon = "&4";
public const string purple = "&5";
public const string gold = "&6";
public const string silver = "&7";
public const string gray = "&8";
public const string blue = "&9";
public const string lime = "&a";
public const string aqua = "&b";
public const string red = "&c";
public const string pink = "&d";
public const string yellow = "&e";
public const string white = "&f";
public static string Parse(string str)
{
switch (str.ToLower())
{
case "black": return black;
case "navy": return navy;
case "green": return green;
case "teal": return teal;
case "maroon": return maroon;
case "purple": return purple;
case "gold": return gold;
case "silver": return silver;
case "gray": return gray;
case "blue": return blue;
case "lime": return lime;
case "aqua": return aqua;
case "red": return red;
case "pink": return pink;
case "yellow": return yellow;
case "white": return white;
default: return "";
}
}
public static string Name(string str)
{
switch (str)
{
case black: return "black";
case navy: return "navy";
case green: return "green";
case teal: return "teal";
case maroon: return "maroon";
case purple: return "purple";
case gold: return "gold";
case silver: return "silver";
case gray: return "gray";
case blue: return "blue";
case lime: return "lime";
case aqua: return "aqua";
case red: return "red";
case pink: return "pink";
case yellow: return "yellow";
case white: return "white";
default: return "";
}
}
}
}