• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

google / vector_math.dart / 17181727464

04 Aug 2025 07:19PM UTC coverage: 26.702% (+0.3%) from 26.388%
17181727464

push

github

web-flow
Bump min SDK to 3.7, update dependencies, reformat (#348)

496 of 1182 new or added lines in 55 files covered. (41.96%)

18 existing lines in 8 files now uncovered.

4463 of 16714 relevant lines covered (26.7%)

1.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/src/vector_math_64/colors.dart
1
// Copyright (c) 2015, Google Inc. Please see the AUTHORS file for details.
2
// All rights reserved. Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4

5
part of '../../vector_math_64.dart';
6

7
/// Contains functions for converting between different color models and
8
/// manipulating colors. In addition to that, some known colors can be accessed
9
/// for fast prototyping.
10
class Colors {
11
  static final _hexStringFullRegex = RegExp(
×
12
    r'\#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})(?:([0-9a-f]{2}))?',
13
    caseSensitive: false,
14
  );
UNCOV
15
  static final _hexStringSmallRegex = RegExp(
×
16
    r'\#?([0-9a-f])([0-9a-f])([0-9a-f])(?:([0-9a-f]))?',
17
    caseSensitive: false,
18
  );
19

20
  /// Convert a color with [r], [g], [b] and [a] component between 0 and 255 to
21
  /// a color with values between 0.0 and 1.0 and store it in [result].
22
  static void fromRgba(int r, int g, int b, int a, Vector4 result) {
×
23
    result.setValues(r / 255.0, g / 255.0, b / 255.0, a / 255.0);
×
24
  }
25

26
  /// Convert the color as a string in the format '#FF0F00', '#FFFF0F00', '#FF0'
27
  /// or '#FFF0' (with or without a leading '#', case insensitive) to the
28
  /// corresponding color value and store it in [result]. The first group is
29
  /// treated as the alpha channel if a [value] with four groups is passed.
30
  static void fromHexString(String value, Vector4 result) {
×
31
    final fullMatch = _hexStringFullRegex.matchAsPrefix(value);
×
32

33
    if (fullMatch != null) {
34
      if (fullMatch[4] == null) {
×
35
        final r = int.parse(fullMatch[1]!, radix: 16);
×
36
        final g = int.parse(fullMatch[2]!, radix: 16);
×
37
        final b = int.parse(fullMatch[3]!, radix: 16);
×
38

39
        fromRgba(r, g, b, 255, result);
×
40
        return;
41
      } else {
42
        final a = int.parse(fullMatch[1]!, radix: 16);
×
43
        final r = int.parse(fullMatch[2]!, radix: 16);
×
44
        final g = int.parse(fullMatch[3]!, radix: 16);
×
45
        final b = int.parse(fullMatch[4]!, radix: 16);
×
46

47
        fromRgba(r, g, b, a, result);
×
48
        return;
49
      }
50
    }
51

52
    final smallMatch = _hexStringSmallRegex.matchAsPrefix(value);
×
53

54
    if (smallMatch != null) {
55
      if (smallMatch[4] == null) {
×
56
        final r = int.parse(smallMatch[1]! + smallMatch[1]!, radix: 16);
×
57
        final g = int.parse(smallMatch[2]! + smallMatch[2]!, radix: 16);
×
58
        final b = int.parse(smallMatch[3]! + smallMatch[3]!, radix: 16);
×
59

60
        fromRgba(r, g, b, 255, result);
×
61
        return;
62
      } else {
63
        final a = int.parse(smallMatch[1]! + smallMatch[1]!, radix: 16);
×
64
        final r = int.parse(smallMatch[2]! + smallMatch[2]!, radix: 16);
×
65
        final g = int.parse(smallMatch[3]! + smallMatch[3]!, radix: 16);
×
66
        final b = int.parse(smallMatch[4]! + smallMatch[4]!, radix: 16);
×
67

68
        fromRgba(r, g, b, a, result);
×
69
        return;
70
      }
71
    }
72

73
    throw FormatException('Could not parse hex color $value');
×
74
  }
75

76
  /// Convert a [input] color to a hex string without a leading '#'. To include
77
  /// the alpha channel, set [alpha] to true, it is false by default. If [short]
78
  /// is true, the resulting hex string might also be a short version, like #ff0
79
  /// (default false).
NEW
80
  static String toHexString(
×
81
    Vector4 input, {
82
    bool alpha = false,
83
    bool short = false,
84
  }) {
85
    final r = (input.r * 0xFF).floor() & 0xFF;
×
86
    final g = (input.g * 0xFF).floor() & 0xFF;
×
87
    final b = (input.b * 0xFF).floor() & 0xFF;
×
88
    final a = (input.a * 0xFF).floor() & 0xFF;
×
89

90
    final isShort =
91
        short &&
92
        ((r >> 4) == (r & 0xF)) &&
×
93
        ((g >> 4) == (g & 0xF)) &&
×
94
        ((b >> 4) == (b & 0xF)) &&
×
95
        (!alpha || (a >> 4) == (a & 0xF));
×
96

97
    if (isShort) {
98
      final rgb =
NEW
99
          (r & 0xF).toRadixString(16) +
×
100
          (g & 0xF).toRadixString(16) +
×
101
          (b & 0xF).toRadixString(16);
×
102

103
      return alpha ? (a & 0xF).toRadixString(16) + rgb : rgb;
×
104
    } else {
105
      final rgb =
NEW
106
          r.toRadixString(16).padLeft(2, '0') +
×
107
          g.toRadixString(16).padLeft(2, '0') +
×
108
          b.toRadixString(16).padLeft(2, '0');
×
109

110
      return alpha ? a.toRadixString(16).padLeft(2, '0') + rgb : rgb;
×
111
    }
112
  }
113

114
  /// Blend the [foreground] color over [background] color and store the color
115
  /// in [result].
116
  static void alphaBlend(
×
117
    Vector4 foreground,
118
    Vector4 background,
119
    Vector4 result,
120
  ) {
121
    final a = foreground.a + (1.0 - foreground.a) * background.a;
×
122
    final factor = 1.0 / a;
×
123

124
    final r =
NEW
125
        factor *
×
126
        (foreground.a * foreground.r +
×
127
            (1.0 - foreground.a) * background.a * background.r);
×
128
    final g =
NEW
129
        factor *
×
130
        (foreground.a * foreground.g +
×
131
            (1.0 - foreground.a) * background.a * background.g);
×
132
    final b =
NEW
133
        factor *
×
134
        (foreground.a * foreground.b +
×
135
            (1.0 - foreground.a) * background.a * background.b);
×
136

137
    result.setValues(r, g, b, a);
×
138
  }
139

140
  /// Convert a [input] color to a gray scaled color and store it in [result].
141
  static void toGrayscale(Vector4 input, Vector4 result) {
×
142
    final value = 0.21 * input.r + 0.71 * input.g + 0.07 * input.b;
×
143

144
    result
145
      ..r = value
×
146
      ..g = value
×
147
      ..b = value
×
148
      ..a = input.a;
×
149
  }
150

151
  /// Convert [linearColor] from linear space into gamma color space and store
152
  /// the result in [gammaColor]. It is possible to specify a optional [gamma],
153
  /// the default value is 2.2.
NEW
154
  static void linearToGamma(
×
155
    Vector4 linearColor,
156
    Vector4 gammaColor, [
157
    double gamma = 2.2,
158
  ]) {
UNCOV
159
    final exponent = 1.0 / gamma;
×
160

161
    gammaColor
162
      ..r = math.pow(linearColor.r, exponent).toDouble()
×
163
      ..g = math.pow(linearColor.g, exponent).toDouble()
×
164
      ..b = math.pow(linearColor.b, exponent).toDouble()
×
165
      ..a = linearColor.a;
×
166
  }
167

168
  /// Convert [gammaColor] from gamma space into linear color space and store
169
  /// the result in [linearColor]. It is possible to specify a optional [gamma],
170
  /// the default value is 2.2.
NEW
171
  static void gammaToLinear(
×
172
    Vector4 gammaColor,
173
    Vector4 linearColor, [
174
    double gamma = 2.2,
175
  ]) {
176
    linearColor
177
      ..r = math.pow(gammaColor.r, gamma).toDouble()
×
178
      ..g = math.pow(gammaColor.g, gamma).toDouble()
×
179
      ..b = math.pow(gammaColor.b, gamma).toDouble()
×
180
      ..a = gammaColor.a;
×
181
  }
182

183
  /// Convert [rgbColor] from rgb color model to the hue, saturation, and value
184
  /// (HSV) color model and store it in [hsvColor].
185
  static void rgbToHsv(Vector4 rgbColor, Vector4 hsvColor) {
×
186
    final max = math.max(math.max(rgbColor.r, rgbColor.g), rgbColor.b);
×
187
    final min = math.min(math.min(rgbColor.r, rgbColor.g), rgbColor.b);
×
188
    final d = max - min;
×
189
    final v = max;
190
    final s = max == 0.0 ? 0.0 : d / max;
×
191
    var h = 0.0;
192

193
    if (max != min) {
×
194
      if (max == rgbColor.r) {
×
195
        h =
NEW
196
            (rgbColor.g - rgbColor.b) / d +
×
197
            (rgbColor.g < rgbColor.b ? 6.0 : 0.0);
×
198
      } else if (max == rgbColor.g) {
×
199
        h = (rgbColor.b - rgbColor.r) / d + 2.0;
×
200
      } else {
201
        h = (rgbColor.r - rgbColor.g) / d + 4.0;
×
202
      }
203

204
      h /= 6.0;
×
205
    }
206

207
    hsvColor.setValues(h, s, v, rgbColor.a);
×
208
  }
209

210
  /// Convert [hsvColor] from hue, saturation, and value (HSV) color model to
211
  /// the RGB color model and store it in [rgbColor].
212
  static void hsvToRgb(Vector4 hsvColor, Vector4 rgbColor) {
×
213
    final i = (hsvColor.x * 6.0).floor();
×
214
    final f = hsvColor.x * 6.0 - i.toDouble();
×
215
    final p = hsvColor.z * (1.0 - hsvColor.y);
×
216
    final q = hsvColor.z * (1.0 - f * hsvColor.y);
×
217
    final t = hsvColor.z * (1.0 - (1.0 - f) * hsvColor.y);
×
218

219
    switch (i % 6) {
×
220
      case 0:
×
221
        rgbColor.setValues(hsvColor.z, t, p, hsvColor.a);
×
222
        break;
223
      case 1:
×
224
        rgbColor.setValues(q, hsvColor.z, p, hsvColor.a);
×
225
        break;
226
      case 2:
×
227
        rgbColor.setValues(p, hsvColor.z, t, hsvColor.a);
×
228
        break;
229
      case 3:
×
230
        rgbColor.setValues(p, q, hsvColor.z, hsvColor.a);
×
231
        break;
232
      case 4:
×
233
        rgbColor.setValues(t, p, hsvColor.z, hsvColor.a);
×
234
        break;
235
      case 5:
×
236
        rgbColor.setValues(hsvColor.z, p, q, hsvColor.a);
×
237
        break;
238
    }
239
  }
240

241
  /// Convert [rgbColor] from rgb color model to the hue, saturation, and
242
  /// lightness (HSL) color model and store it in [hslColor].
243
  static void rgbToHsl(Vector4 rgbColor, Vector4 hslColor) {
×
244
    final max = math.max(math.max(rgbColor.r, rgbColor.g), rgbColor.b);
×
245
    final min = math.min(math.min(rgbColor.r, rgbColor.g), rgbColor.b);
×
246
    final l = (max + min) / 2.0;
×
247
    var h = 0.0;
248
    var s = 0.0;
249

250
    if (max != min) {
×
251
      final d = max - min;
×
252

253
      s = l > 0.5 ? d / (2.0 - max - min) : d / (max + min);
×
254

255
      if (max == rgbColor.r) {
×
256
        h =
NEW
257
            (rgbColor.g - rgbColor.b) / d +
×
258
            (rgbColor.g < rgbColor.b ? 6.0 : 0.0);
×
259
      } else if (max == rgbColor.g) {
×
260
        h = (rgbColor.b - rgbColor.r) / d + 2.0;
×
261
      } else {
262
        h = (rgbColor.r - rgbColor.g) / d + 4.0;
×
263
      }
264

265
      h /= 6.0;
×
266
    }
267

268
    hslColor.setValues(h, s, l, rgbColor.a);
×
269
  }
270

271
  /// Convert [hslColor] from hue, saturation, and lightness (HSL) color model
272
  /// to the RGB color model and store it in [rgbColor].
273
  static void hslToRgb(Vector4 hslColor, Vector4 rgbColor) {
×
274
    if (hslColor.y == 0.0) {
×
275
      rgbColor.setValues(hslColor.z, hslColor.z, hslColor.z, hslColor.a);
×
276
    } else {
277
      final q =
NEW
278
          hslColor.z < 0.5
×
NEW
279
              ? hslColor.z * (1.0 + hslColor.y)
×
NEW
280
              : hslColor.z + hslColor.y - hslColor.z * hslColor.y;
×
UNCOV
281
      final p = 2.0 * hslColor.z - q;
×
282

283
      final r = _hueToRgb(p, q, hslColor.x + 1.0 / 3.0);
×
284
      final g = _hueToRgb(p, q, hslColor.x);
×
285
      final b = _hueToRgb(p, q, hslColor.x - 1.0 / 3.0);
×
286

287
      rgbColor.setValues(r, g, b, hslColor.a);
×
288
    }
289
  }
290

291
  static double _hueToRgb(double p, double q, double t) {
×
292
    if (t < 0.0) {
×
293
      t += 1.0;
×
294
    } else if (t > 1.0) {
×
295
      t -= 1.0;
×
296
    }
297

298
    if (t < 1.0 / 6.0) {
×
299
      return p + (q - p) * 6.0 * t;
×
300
    } else if (t < 1.0 / 2.0) {
×
301
      return q;
302
    } else if (t < 2.0 / 3.0) {
×
303
      return p + (q - p) * (2.0 / 3.0 - t) * 6.0;
×
304
    } else {
305
      return p;
306
    }
307
  }
308

309
  static Vector4 get transparent =>
×
310
      Vector4(255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0);
×
311
  static Vector4 get aliceBlue =>
×
312
      Vector4(240.0 / 255.0, 248.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
313
  static Vector4 get antiqueWhite =>
×
314
      Vector4(250.0 / 255.0, 235.0 / 255.0, 215.0 / 255.0, 255.0 / 255.0);
×
315
  static Vector4 get aqua =>
×
316
      Vector4(0.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
317
  static Vector4 get aquamarine =>
×
318
      Vector4(127.0 / 255.0, 255.0 / 255.0, 212.0 / 255.0, 255.0 / 255.0);
×
319
  static Vector4 get azure =>
×
320
      Vector4(240.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
321
  static Vector4 get beige =>
×
322
      Vector4(245.0 / 255.0, 245.0 / 255.0, 220.0 / 255.0, 255.0 / 255.0);
×
323
  static Vector4 get bisque =>
×
324
      Vector4(255.0 / 255.0, 228.0 / 255.0, 196.0 / 255.0, 255.0 / 255.0);
×
325
  static Vector4 get black =>
×
326
      Vector4(0.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
327
  static Vector4 get blanchedAlmond =>
×
328
      Vector4(255.0 / 255.0, 235.0 / 255.0, 205.0 / 255.0, 255.0 / 255.0);
×
329
  static Vector4 get blue =>
×
330
      Vector4(0.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
331
  static Vector4 get blueViolet =>
×
332
      Vector4(138.0 / 255.0, 43.0 / 255.0, 226.0 / 255.0, 255.0 / 255.0);
×
333
  static Vector4 get brown =>
×
334
      Vector4(165.0 / 255.0, 42.0 / 255.0, 42.0 / 255.0, 255.0 / 255.0);
×
335
  static Vector4 get burlyWood =>
×
336
      Vector4(222.0 / 255.0, 184.0 / 255.0, 135.0 / 255.0, 255.0 / 255.0);
×
337
  static Vector4 get cadetBlue =>
×
338
      Vector4(95.0 / 255.0, 158.0 / 255.0, 160.0 / 255.0, 255.0 / 255.0);
×
339
  static Vector4 get chartreuse =>
×
340
      Vector4(127.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
341
  static Vector4 get chocolate =>
×
342
      Vector4(210.0 / 255.0, 105.0 / 255.0, 30.0 / 255.0, 255.0 / 255.0);
×
343
  static Vector4 get coral =>
×
344
      Vector4(255.0 / 255.0, 127.0 / 255.0, 80.0 / 255.0, 255.0 / 255.0);
×
345
  static Vector4 get cornflowerBlue =>
×
346
      Vector4(100.0 / 255.0, 149.0 / 255.0, 237.0 / 255.0, 255.0 / 255.0);
×
347
  static Vector4 get cornsilk =>
×
348
      Vector4(255.0 / 255.0, 248.0 / 255.0, 220.0 / 255.0, 255.0 / 255.0);
×
349
  static Vector4 get crimson =>
×
350
      Vector4(220.0 / 255.0, 20.0 / 255.0, 60.0 / 255.0, 255.0 / 255.0);
×
351
  static Vector4 get cyan =>
×
352
      Vector4(0.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
353
  static Vector4 get darkBlue =>
×
354
      Vector4(0.0 / 255.0, 0.0 / 255.0, 139.0 / 255.0, 255.0 / 255.0);
×
355
  static Vector4 get darkCyan =>
×
356
      Vector4(0.0 / 255.0, 139.0 / 255.0, 139.0 / 255.0, 255.0 / 255.0);
×
357
  static Vector4 get darkGoldenrod =>
×
358
      Vector4(184.0 / 255.0, 134.0 / 255.0, 11.0 / 255.0, 255.0 / 255.0);
×
359
  static Vector4 get darkGray =>
×
360
      Vector4(169.0 / 255.0, 169.0 / 255.0, 169.0 / 255.0, 255.0 / 255.0);
×
361
  static Vector4 get darkGreen =>
×
362
      Vector4(0.0 / 255.0, 100.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
363
  static Vector4 get darkKhaki =>
×
364
      Vector4(189.0 / 255.0, 183.0 / 255.0, 107.0 / 255.0, 255.0 / 255.0);
×
365
  static Vector4 get darkMagenta =>
×
366
      Vector4(139.0 / 255.0, 0.0 / 255.0, 139.0 / 255.0, 255.0 / 255.0);
×
367
  static Vector4 get darkOliveGreen =>
×
368
      Vector4(85.0 / 255.0, 107.0 / 255.0, 47.0 / 255.0, 255.0 / 255.0);
×
369
  static Vector4 get darkOrange =>
×
370
      Vector4(255.0 / 255.0, 140.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
371
  static Vector4 get darkOrchid =>
×
372
      Vector4(153.0 / 255.0, 50.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0);
×
373
  static Vector4 get darkRed =>
×
374
      Vector4(139.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
375
  static Vector4 get darkSalmon =>
×
376
      Vector4(233.0 / 255.0, 150.0 / 255.0, 122.0 / 255.0, 255.0 / 255.0);
×
377
  static Vector4 get darkSeaGreen =>
×
378
      Vector4(143.0 / 255.0, 188.0 / 255.0, 139.0 / 255.0, 255.0 / 255.0);
×
379
  static Vector4 get darkSlateBlue =>
×
380
      Vector4(72.0 / 255.0, 61.0 / 255.0, 139.0 / 255.0, 255.0 / 255.0);
×
381
  static Vector4 get darkSlateGray =>
×
382
      Vector4(47.0 / 255.0, 79.0 / 255.0, 79.0 / 255.0, 255.0 / 255.0);
×
383
  static Vector4 get darkTurquoise =>
×
384
      Vector4(0.0 / 255.0, 206.0 / 255.0, 209.0 / 255.0, 255.0 / 255.0);
×
385
  static Vector4 get darkViolet =>
×
386
      Vector4(148.0 / 255.0, 0.0 / 255.0, 211.0 / 255.0, 255.0 / 255.0);
×
387
  static Vector4 get deepPink =>
×
388
      Vector4(255.0 / 255.0, 20.0 / 255.0, 147.0 / 255.0, 255.0 / 255.0);
×
389
  static Vector4 get deepSkyBlue =>
×
390
      Vector4(0.0 / 255.0, 191.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
391
  static Vector4 get dimGray =>
×
392
      Vector4(105.0 / 255.0, 105.0 / 255.0, 105.0 / 255.0, 255.0 / 255.0);
×
393
  static Vector4 get dodgerBlue =>
×
394
      Vector4(30.0 / 255.0, 144.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
395
  static Vector4 get firebrick =>
×
396
      Vector4(178.0 / 255.0, 34.0 / 255.0, 34.0 / 255.0, 255.0 / 255.0);
×
397
  static Vector4 get floralWhite =>
×
398
      Vector4(255.0 / 255.0, 250.0 / 255.0, 240.0 / 255.0, 255.0 / 255.0);
×
399
  static Vector4 get forestGreen =>
×
400
      Vector4(34.0 / 255.0, 139.0 / 255.0, 34.0 / 255.0, 255.0 / 255.0);
×
401
  static Vector4 get fuchsia =>
×
402
      Vector4(255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
403
  static Vector4 get gainsboro =>
×
404
      Vector4(220.0 / 255.0, 220.0 / 255.0, 220.0 / 255.0, 255.0 / 255.0);
×
405
  static Vector4 get ghostWhite =>
×
406
      Vector4(248.0 / 255.0, 248.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
407
  static Vector4 get gold =>
×
408
      Vector4(255.0 / 255.0, 215.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
409
  static Vector4 get goldenrod =>
×
410
      Vector4(218.0 / 255.0, 165.0 / 255.0, 32.0 / 255.0, 255.0 / 255.0);
×
411
  static Vector4 get gray =>
×
412
      Vector4(128.0 / 255.0, 128.0 / 255.0, 128.0 / 255.0, 255.0 / 255.0);
×
413
  static Vector4 get green =>
×
414
      Vector4(0.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
415
  static Vector4 get greenYellow =>
×
416
      Vector4(173.0 / 255.0, 255.0 / 255.0, 47.0 / 255.0, 255.0 / 255.0);
×
417
  static Vector4 get honeydew =>
×
418
      Vector4(240.0 / 255.0, 255.0 / 255.0, 240.0 / 255.0, 255.0 / 255.0);
×
419
  static Vector4 get hotPink =>
×
420
      Vector4(255.0 / 255.0, 105.0 / 255.0, 180.0 / 255.0, 255.0 / 255.0);
×
421
  static Vector4 get indianRed =>
×
422
      Vector4(205.0 / 255.0, 92.0 / 255.0, 92.0 / 255.0, 255.0 / 255.0);
×
423
  static Vector4 get indigo =>
×
424
      Vector4(75.0 / 255.0, 0.0 / 255.0, 130.0 / 255.0, 255.0 / 255.0);
×
425
  static Vector4 get ivory =>
×
426
      Vector4(255.0 / 255.0, 255.0 / 255.0, 240.0 / 255.0, 255.0 / 255.0);
×
427
  static Vector4 get khaki =>
×
428
      Vector4(240.0 / 255.0, 230.0 / 255.0, 140.0 / 255.0, 255.0 / 255.0);
×
429
  static Vector4 get lavender =>
×
430
      Vector4(230.0 / 255.0, 230.0 / 255.0, 250.0 / 255.0, 255.0 / 255.0);
×
431
  static Vector4 get lavenderBlush =>
×
432
      Vector4(255.0 / 255.0, 240.0 / 255.0, 245.0 / 255.0, 255.0 / 255.0);
×
433
  static Vector4 get lawnGreen =>
×
434
      Vector4(124.0 / 255.0, 252.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
435
  static Vector4 get lemonChiffon =>
×
436
      Vector4(255.0 / 255.0, 250.0 / 255.0, 205.0 / 255.0, 255.0 / 255.0);
×
437
  static Vector4 get lightBlue =>
×
438
      Vector4(173.0 / 255.0, 216.0 / 255.0, 230.0 / 255.0, 255.0 / 255.0);
×
439
  static Vector4 get lightCoral =>
×
440
      Vector4(240.0 / 255.0, 128.0 / 255.0, 128.0 / 255.0, 255.0 / 255.0);
×
441
  static Vector4 get lightCyan =>
×
442
      Vector4(224.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
443
  static Vector4 get lightGoldenrodYellow =>
×
444
      Vector4(250.0 / 255.0, 250.0 / 255.0, 210.0 / 255.0, 255.0 / 255.0);
×
445
  static Vector4 get lightGreen =>
×
446
      Vector4(144.0 / 255.0, 238.0 / 255.0, 144.0 / 255.0, 255.0 / 255.0);
×
447
  static Vector4 get lightGray =>
×
448
      Vector4(211.0 / 255.0, 211.0 / 255.0, 211.0 / 255.0, 255.0 / 255.0);
×
449
  static Vector4 get lightPink =>
×
450
      Vector4(255.0 / 255.0, 182.0 / 255.0, 193.0 / 255.0, 255.0 / 255.0);
×
451
  static Vector4 get lightSalmon =>
×
452
      Vector4(255.0 / 255.0, 160.0 / 255.0, 122.0 / 255.0, 255.0 / 255.0);
×
453
  static Vector4 get lightSeaGreen =>
×
454
      Vector4(32.0 / 255.0, 178.0 / 255.0, 170.0 / 255.0, 255.0 / 255.0);
×
455
  static Vector4 get lightSkyBlue =>
×
456
      Vector4(135.0 / 255.0, 206.0 / 255.0, 250.0 / 255.0, 255.0 / 255.0);
×
457
  static Vector4 get lightSlateGray =>
×
458
      Vector4(119.0 / 255.0, 136.0 / 255.0, 153.0 / 255.0, 255.0 / 255.0);
×
459
  static Vector4 get lightSteelBlue =>
×
460
      Vector4(176.0 / 255.0, 196.0 / 255.0, 222.0 / 255.0, 255.0 / 255.0);
×
461
  static Vector4 get lightYellow =>
×
462
      Vector4(255.0 / 255.0, 255.0 / 255.0, 224.0 / 255.0, 255.0 / 255.0);
×
463
  static Vector4 get lime =>
×
464
      Vector4(0.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
465
  static Vector4 get limeGreen =>
×
466
      Vector4(50.0 / 255.0, 205.0 / 255.0, 50.0 / 255.0, 255.0 / 255.0);
×
467
  static Vector4 get linen =>
×
468
      Vector4(250.0 / 255.0, 240.0 / 255.0, 230.0 / 255.0, 255.0 / 255.0);
×
469
  static Vector4 get magenta =>
×
470
      Vector4(255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
471
  static Vector4 get maroon =>
×
472
      Vector4(128.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
473
  static Vector4 get mediumAquamarine =>
×
474
      Vector4(102.0 / 255.0, 205.0 / 255.0, 170.0 / 255.0, 255.0 / 255.0);
×
475
  static Vector4 get mediumBlue =>
×
476
      Vector4(0.0 / 255.0, 0.0 / 255.0, 205.0 / 255.0, 255.0 / 255.0);
×
477
  static Vector4 get mediumOrchid =>
×
478
      Vector4(186.0 / 255.0, 85.0 / 255.0, 211.0 / 255.0, 255.0 / 255.0);
×
479
  static Vector4 get mediumPurple =>
×
480
      Vector4(147.0 / 255.0, 112.0 / 255.0, 219.0 / 255.0, 255.0 / 255.0);
×
481
  static Vector4 get mediumSeaGreen =>
×
482
      Vector4(60.0 / 255.0, 179.0 / 255.0, 113.0 / 255.0, 255.0 / 255.0);
×
483
  static Vector4 get mediumSlateBlue =>
×
484
      Vector4(123.0 / 255.0, 104.0 / 255.0, 238.0 / 255.0, 255.0 / 255.0);
×
485
  static Vector4 get mediumSpringGreen =>
×
486
      Vector4(0.0 / 255.0, 250.0 / 255.0, 154.0 / 255.0, 255.0 / 255.0);
×
487
  static Vector4 get mediumTurquoise =>
×
488
      Vector4(72.0 / 255.0, 209.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0);
×
489
  static Vector4 get mediumVioletRed =>
×
490
      Vector4(199.0 / 255.0, 21.0 / 255.0, 133.0 / 255.0, 255.0 / 255.0);
×
491
  static Vector4 get midnightBlue =>
×
492
      Vector4(25.0 / 255.0, 25.0 / 255.0, 112.0 / 255.0, 255.0 / 255.0);
×
493
  static Vector4 get mintCream =>
×
494
      Vector4(245.0 / 255.0, 255.0 / 255.0, 250.0 / 255.0, 255.0 / 255.0);
×
495
  static Vector4 get mistyRose =>
×
496
      Vector4(255.0 / 255.0, 228.0 / 255.0, 225.0 / 255.0, 255.0 / 255.0);
×
497
  static Vector4 get moccasin =>
×
498
      Vector4(255.0 / 255.0, 228.0 / 255.0, 181.0 / 255.0, 255.0 / 255.0);
×
499
  static Vector4 get navajoWhite =>
×
500
      Vector4(255.0 / 255.0, 222.0 / 255.0, 173.0 / 255.0, 255.0 / 255.0);
×
501
  static Vector4 get navy =>
×
502
      Vector4(0.0 / 255.0, 0.0 / 255.0, 128.0 / 255.0, 255.0 / 255.0);
×
503
  static Vector4 get oldLace =>
×
504
      Vector4(253.0 / 255.0, 245.0 / 255.0, 230.0 / 255.0, 255.0 / 255.0);
×
505
  static Vector4 get olive =>
×
506
      Vector4(128.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
507
  static Vector4 get oliveDrab =>
×
508
      Vector4(107.0 / 255.0, 142.0 / 255.0, 35.0 / 255.0, 255.0 / 255.0);
×
509
  static Vector4 get orange =>
×
510
      Vector4(255.0 / 255.0, 165.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
511
  static Vector4 get orangeRed =>
×
512
      Vector4(255.0 / 255.0, 69.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
513
  static Vector4 get orchid =>
×
514
      Vector4(218.0 / 255.0, 112.0 / 255.0, 214.0 / 255.0, 255.0 / 255.0);
×
515
  static Vector4 get paleGoldenrod =>
×
516
      Vector4(238.0 / 255.0, 232.0 / 255.0, 170.0 / 255.0, 255.0 / 255.0);
×
517
  static Vector4 get paleGreen =>
×
518
      Vector4(152.0 / 255.0, 251.0 / 255.0, 152.0 / 255.0, 255.0 / 255.0);
×
519
  static Vector4 get paleTurquoise =>
×
520
      Vector4(175.0 / 255.0, 238.0 / 255.0, 238.0 / 255.0, 255.0 / 255.0);
×
521
  static Vector4 get paleVioletRed =>
×
522
      Vector4(219.0 / 255.0, 112.0 / 255.0, 147.0 / 255.0, 255.0 / 255.0);
×
523
  static Vector4 get papayaWhip =>
×
524
      Vector4(255.0 / 255.0, 239.0 / 255.0, 213.0 / 255.0, 255.0 / 255.0);
×
525
  static Vector4 get peachPuff =>
×
526
      Vector4(255.0 / 255.0, 218.0 / 255.0, 185.0 / 255.0, 255.0 / 255.0);
×
527
  static Vector4 get peru =>
×
528
      Vector4(205.0 / 255.0, 133.0 / 255.0, 63.0 / 255.0, 255.0 / 255.0);
×
529
  static Vector4 get pink =>
×
530
      Vector4(255.0 / 255.0, 192.0 / 255.0, 203.0 / 255.0, 255.0 / 255.0);
×
531
  static Vector4 get plum =>
×
532
      Vector4(221.0 / 255.0, 160.0 / 255.0, 221.0 / 255.0, 255.0 / 255.0);
×
533
  static Vector4 get powderBlue =>
×
534
      Vector4(176.0 / 255.0, 224.0 / 255.0, 230.0 / 255.0, 255.0 / 255.0);
×
535
  static Vector4 get purple =>
×
536
      Vector4(128.0 / 255.0, 0.0 / 255.0, 128.0 / 255.0, 255.0 / 255.0);
×
537
  static Vector4 get red =>
×
538
      Vector4(255.0 / 255.0, 0.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
539
  static Vector4 get rosyBrown =>
×
540
      Vector4(188.0 / 255.0, 143.0 / 255.0, 143.0 / 255.0, 255.0 / 255.0);
×
541
  static Vector4 get royalBlue =>
×
542
      Vector4(65.0 / 255.0, 105.0 / 255.0, 225.0 / 255.0, 255.0 / 255.0);
×
543
  static Vector4 get saddleBrown =>
×
544
      Vector4(139.0 / 255.0, 69.0 / 255.0, 19.0 / 255.0, 255.0 / 255.0);
×
545
  static Vector4 get salmon =>
×
546
      Vector4(250.0 / 255.0, 128.0 / 255.0, 114.0 / 255.0, 255.0 / 255.0);
×
547
  static Vector4 get sandyBrown =>
×
548
      Vector4(244.0 / 255.0, 164.0 / 255.0, 96.0 / 255.0, 255.0 / 255.0);
×
549
  static Vector4 get seaGreen =>
×
550
      Vector4(46.0 / 255.0, 139.0 / 255.0, 87.0 / 255.0, 255.0 / 255.0);
×
551
  static Vector4 get seaShell =>
×
552
      Vector4(255.0 / 255.0, 245.0 / 255.0, 238.0 / 255.0, 255.0 / 255.0);
×
553
  static Vector4 get sienna =>
×
554
      Vector4(160.0 / 255.0, 82.0 / 255.0, 45.0 / 255.0, 255.0 / 255.0);
×
555
  static Vector4 get silver =>
×
556
      Vector4(192.0 / 255.0, 192.0 / 255.0, 192.0 / 255.0, 255.0 / 255.0);
×
557
  static Vector4 get skyBlue =>
×
558
      Vector4(135.0 / 255.0, 206.0 / 255.0, 235.0 / 255.0, 255.0 / 255.0);
×
559
  static Vector4 get slateBlue =>
×
560
      Vector4(106.0 / 255.0, 90.0 / 255.0, 205.0 / 255.0, 255.0 / 255.0);
×
561
  static Vector4 get slateGray =>
×
562
      Vector4(112.0 / 255.0, 128.0 / 255.0, 144.0 / 255.0, 255.0 / 255.0);
×
563
  static Vector4 get snow =>
×
564
      Vector4(255.0 / 255.0, 250.0 / 255.0, 250.0 / 255.0, 255.0 / 255.0);
×
565
  static Vector4 get springGreen =>
×
566
      Vector4(0.0 / 255.0, 255.0 / 255.0, 127.0 / 255.0, 255.0 / 255.0);
×
567
  static Vector4 get steelBlue =>
×
568
      Vector4(70.0 / 255.0, 130.0 / 255.0, 180.0 / 255.0, 255.0 / 255.0);
×
569
  static Vector4 get tan =>
×
570
      Vector4(210.0 / 255.0, 180.0 / 255.0, 140.0 / 255.0, 255.0 / 255.0);
×
571
  static Vector4 get teal =>
×
572
      Vector4(0.0 / 255.0, 128.0 / 255.0, 128.0 / 255.0, 255.0 / 255.0);
×
573
  static Vector4 get thistle =>
×
574
      Vector4(216.0 / 255.0, 191.0 / 255.0, 216.0 / 255.0, 255.0 / 255.0);
×
575
  static Vector4 get tomato =>
×
576
      Vector4(255.0 / 255.0, 99.0 / 255.0, 71.0 / 255.0, 255.0 / 255.0);
×
577
  static Vector4 get turquoise =>
×
578
      Vector4(64.0 / 255.0, 224.0 / 255.0, 208.0 / 255.0, 255.0 / 255.0);
×
579
  static Vector4 get violet =>
×
580
      Vector4(238.0 / 255.0, 130.0 / 255.0, 238.0 / 255.0, 255.0 / 255.0);
×
581
  static Vector4 get wheat =>
×
582
      Vector4(245.0 / 255.0, 222.0 / 255.0, 179.0 / 255.0, 255.0 / 255.0);
×
583
  static Vector4 get white =>
×
584
      Vector4(255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0, 255.0 / 255.0);
×
585
  static Vector4 get whiteSmoke =>
×
586
      Vector4(245.0 / 255.0, 245.0 / 255.0, 245.0 / 255.0, 255.0 / 255.0);
×
587
  static Vector4 get yellow =>
×
588
      Vector4(255.0 / 255.0, 255.0 / 255.0, 0.0 / 255.0, 255.0 / 255.0);
×
589
  static Vector4 get yellowGreen =>
×
590
      Vector4(154.0 / 255.0, 205.0 / 255.0, 50.0 / 255.0, 255.0 / 255.0);
×
591

592
  Colors._();
×
593
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc