Tanoda
LeapColor.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using UnityEngine;
10
11namespace Leap.Unity {
12
19 public static class LeapColor {
20
21 private static Color lerp(Color a, Color b, float amount) {
22 return Color.Lerp(a, b, amount);
23 }
24
25 private static Color hex(byte r, byte g, byte b) {
26 return new Color(r / 255f, g / 255f, b / 255f);
27 }
28
29 private static Color hex(float r, float g, float b) {
30 return new Color(r / 255f, g / 255f, b / 255f);
31 }
32
33 public static Color amber {
34 get { return hex(0xFF, 0xBF, 0x00); }
35 }
36
37 public static Color aqua {
38 get { return hex(143f, 224f, 247f); }
39 }
40
41 public static Color auburn {
42 get { return hex(0x92, 0x27, 0x24); }
43 }
44
45 public static Color beige {
46 get { return hex(0xF5, 0xF5, 0xDC); }
47 }
48
49 public static Color black {
50 get { return Color.black; }
51 }
52
53 public static Color blue {
54 get { return Color.blue; }
55 }
56
57 public static Color brickRed {
58 get { return hex(0xcb, 0x41, 0x54); }
59 }
60
61 public static Color brown {
62 get { return hex(0x96, 0x4B, 0x00); }
63 }
64
65 public static Color burgundy {
66 get { return hex(0x80, 0x00, 0x20); }
67 }
68
70 public static Color chartreuse {
71 get { return hex(0x7f, 0xff, 0x00); }
72 }
73
74 public static Color coral {
75 get { return hex(0xFF, 0x7F, 0x50); }
76 }
77
79 public static Color cerulean {
80 get { return hex(0x00, 0x7B, 0xA7); }
81 }
82
83 public static Color cyan {
84 get { return Color.cyan; }
85 }
86
87 public static Color electricBlue {
88 get { return hex(0x7D, 0xF9, 0xFF); }
89 }
90
91 public static Color forest {
92 get { return hex(0x22, 0x8B, 0x22); }
93 }
94
96 public static Color fuschia {
97 get { return Color.magenta; }
98 }
99
100 public static Color gold {
101 get { return hex(0xD4, 0xAF, 0x37); }
102 }
103
104 public static Color gray {
105 get { return new Color(0.5f, 0.5f, 0.5f); }
106 }
107
109 public static Color grayPercent(float percent) {
110 return new Color(percent, percent, percent);
111 }
112
113 public static Color green {
114 get { return Color.green; }
115 }
116
117 public static Color hotPink {
118 get { return hex(0xf8, 0x18, 0x94); }
119 }
120
121 public static Color jade {
122 get { return hex(0x00, 0xA8, 0x6B); }
123 }
124
125 public static Color khaki {
126 get { return hex(0xC3, 0xB0, 0x91); }
127 }
128
129 public static Color lavender {
130 get { return hex(0xB5, 0x7E, 0xDC); }
131 }
132
133 public static Color leapGreen {
134 get { return hex(0x5d, 0xaa, 0x00); }
135 }
136
137 public static Color lilac {
138 get { return hex(0xc8, 0xa2, 0xc8); }
139 }
140
141 public static Color lime {
142 get { return hex(158f, 253f, 56f); }
143 }
144
147 public static Color magenta {
148 get { return hex(0xff, 0x00, 0x90); }
149 }
150
152 public static Color mauve {
153 get { return hex(0xe0, 0xb0, 0xff); }
154 }
155
156 public static Color mint {
157 get { return hex(0x98, 0xFB, 0x98); }
158 }
159
160 public static Color navy {
161 get { return hex(0x00, 0x00, 0x80); }
162 }
163
164 public static Color olive {
165 get { return hex(0x80, 0x80, 0x00); }
166 }
167
168 public static Color orange {
169 get { return lerp(red, yellow, 0.5f); }
170 }
171
172 public static Color periwinkle {
173 get { return hex(0xCC, 0xCC, 0xFF); }
174 }
175
176 public static Color pink {
177 get { return hex(255f, 0xC0, 0xCB); }
178 }
179
180 public static Color purple {
181 get { return lerp(magenta, blue, 0.3f); }
182 }
183
184 public static Color red {
185 get { return Color.red; }
186 }
187
188 public static Color robinsEgg {
189 get { return hex(0x1f, 0xce, 0xcb); }
190 }
191
192 public static Color royalPurple { get { return hex(0x78, 0x51, 0xa9); }}
193
194 public static Color ruby { get { return hex(0x9b, 0x11, 0x1e); }}
195
196 public static Color saffron {
197 get { return hex(0xff, 0x99, 0x33); }
198 }
199
200 public static Color teal {
201 get { return hex(0x00, 0x80, 0x80); }
202 }
203
204 public static Color turquoise {
205 get { return hex(0x40, 0xE0, 0xD0); }
206 }
207
208 public static Color veridian {
209 get { return hex(0x40, 0x82, 0x6D); }
210 }
211
212 public static Color violet {
213 get { return hex(0x7F, 0x00, 0xFF); }
214 }
215
216 public static Color white {
217 get { return Color.white; }
218 }
219
220 public static Color yellow {
221 get { return Color.yellow; }
222 }
223
224 }
225
226}
UnityEngine.Color Color
Definition: TestScript.cs:32