Gorgon Game Engine
Color.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string.h>
4 #include <vector>
5 #include <sstream>
6 #include <iostream>
7 #include <iomanip>
8 #include <stdint.h>
9 #include <stdexcept>
10 
11 #include "../Types.h"
12 
13 namespace Gorgon { namespace Graphics {
14 
16  enum class ColorMode {
18  Invalid = 0,
19 
21  Automatic = 0,
22 
24  RGB = 1,
25 
27  BGR = 16,
28 
30  Grayscale = 4,
31 
33  Alpha = 8,
34 
36  RGBA = RGB | Alpha,
37 
40  BGRA = BGR | Alpha,
41 
44  };
45 
47  inline unsigned long GetChannelsPerPixel(ColorMode mode) {
48  switch(mode) {
50  case ColorMode::Alpha:
51  return 1;
53  return 2;
54  case ColorMode::BGR:
55  case ColorMode::RGB:
56  return 3;
57  case ColorMode::RGBA:
58  case ColorMode::BGRA:
59  return 4;
60  default:
61 #ifndef NDEBUG
62  throw std::runtime_error("Unknown mode");
63 #endif
64  return 0;
65  }
66  }
67 
69  inline bool HasAlpha(ColorMode mode) {
70  return ((int)mode & (int)ColorMode::Alpha) != 0;
71  }
72 
74  inline int GetAlphaIndex(ColorMode mode) {
75  switch(mode) {
76  case ColorMode::Alpha:
77  return 0;
79  return 1;
80  case ColorMode::RGBA:
81  case ColorMode::BGRA:
82  return 3;
83  default:
84  return -1;
85  }
86  }
87 
91  class RGBA {
92  public:
94  typedef Byte ChannelType;
95 
96  // cppcheck-suppress uninitMemberVar
98  RGBA() {}
99 
101  RGBA(const RGBA &) = default;
102 
104  RGBA(const RGBA &other, Byte newalpha) : R(other.R), G(other.G), B(other.B), A(newalpha) {}
105 
107  RGBA(const RGBA &other, int newalpha) : R(other.R), G(other.G), B(other.B), A(Byte(newalpha)) {}
108 
110  RGBA(const RGBA &other, double newalpha) : R(other.R), G(other.G), B(other.B), A(Byte(255*newalpha)) {}
111 
113  RGBA(const RGBA &other, float newalpha) : R(other.R), G(other.G), B(other.B), A(Byte(255*newalpha)) {}
114 
116  RGBA(const RGBA &first, const RGBA &second, float alpha = 1.0f) : RGBA(first) {
117  Blend(second, alpha);
118  }
119 
121  RGBA(const RGBA &first, const RGBA &second, double alpha) : RGBA(first) {
122  Blend(second, (float)alpha);
123  }
124 
126  RGBA(const RGBA &first, const RGBA &second, int alpha) : RGBA(first, second, alpha/255.f) { }
127 
129  RGBA(Byte r, Byte g, Byte b, Byte a=255) : R(r), G(g), B(b), A(a) {}
130 
132  explicit RGBA(Byte lum, Byte a=255) : RGBA(lum, lum, lum, a) {}
133 
135  explicit RGBA(int lum, int a) : RGBA(Byte(lum), Byte(lum), Byte(lum), Byte(a)) {}
136 
137  // cppcheck-suppress noExplicitConstructor
139  constexpr RGBA(int color) : R((color>>0)&0xff), G((color>>8)&0xff), B((color>>16)&0xff), A((color>>24)&0xff) {
140  static_assert(sizeof(int)>=4, "This conversion requires size of int to be at least 4 bytes");
141  }
142 
143  // cppcheck-suppress noExplicitConstructor
145  constexpr RGBA(uint32_t color) : R((color>>0)&0xff), G((color>>8)&0xff), B((color>>16)&0xff), A((color>>24)&0xff) {
146  static_assert(sizeof(int)>=4, "This conversion requires size of int to be at least 4 bytes");
147  }
148 
150  explicit RGBA(float lum) : A(255) {
151  if(lum<0) lum=0;
152  if(lum>1) lum=1;
153 
154  R=G=B=Byte(lum*255);
155  }
156 
158  explicit RGBA(double lum) : A(255) {
159  if(lum<0) lum=0;
160  if(lum>1) lum=1;
161 
162  R=G=B=Byte(lum*255);
163  }
164 
166  operator int() const {
167  static_assert(sizeof(int)>=4, "This conversion requires size of int to be at least 4 bytes");
168 
169  int ret;
170  memcpy(&ret, this, 4);
171 
172  return ret;
173  }
174 
176  operator uint32_t() const {
177  uint32_t ret;
178  memcpy(&ret, this, 4);
179 
180  return ret;
181  }
182 
184  RGBA &operator =(const RGBA &) = default;
185 
187  RGBA &operator =(const int &color) {
188  static_assert(sizeof(int)>=4, "This conversion requires size of int to be at least 4 bytes");
189 
190  memcpy(this, &color, 4);
191 
192  return *this;
193  }
194 
196  RGBA &operator =(const uint32_t &color) {
197  memcpy(this, &color, 4);
198 
199  return *this;
200  }
201 
203  RGBA &operator =(float lum) {
204  if(lum<0) lum=0;
205  if(lum>1) lum=1;
206 
207  R=G=B=Byte(lum*255);
208  A=255;
209 
210  return *this;
211  }
212 
214  bool operator==(const RGBA &other) const {
215  return (int)(*this) == (uint32_t)other;
216  }
217 
219  bool operator!=(const RGBA &other) const {
220  return (uint32_t)(*this) != (uint32_t)other;
221  }
222 
227  Byte Luminance() const {
228  return (R>>3) + (R>>4) + (R>>5) + (G>>1) + (G>>3) + (G>>4) + (G>>5) + (B>>4) + (B>>5);
229  }
230 
233  float AccurateLuminance() const {
234  return (0.2126f/255)*R + (0.7151f/255)*G + (0.0722f/255)*B;
235  }
236 
238  std::string HTMLColor() const {
239  std::stringstream str;
240 
241  str<<"#"<<std::fixed<<std::setfill('0')<<std::setw(2)<<R<<std::setw(2)<<G<<std::setw(2)<<B;
242 
243  return str.str();
244  }
245 
248  void Blend(const RGBA &color) {
249  Blend(color, 1.0f);
250  }
251 
254  void Blend(const RGBA &color, float alpha) {
255  if (color.A * alpha == 255) {
256  A = 255;
257  R = color.R;
258  G = color.G;
259  B = color.B;
260  }
261  else {
262  float a = color.A*alpha / 255;
263  float alpham1 = (1 - a);
264 
265  alpham1 *= A / 255.f;
266 
267  float aa = a + A/255.f * (1 - a);
268 
269  if(aa > 0) {
270  R = Byte((R*alpham1 + color.R*a)/aa);
271  G = Byte((G*alpham1 + color.G*a)/aa);
272  B = Byte((B*alpham1 + color.B*a)/aa);
273  }
274  A = Byte(aa*255);
275  }
276  }
277 
279  RGBA BlendWith(const RGBA &color) const {
280  auto n = *this;
281  n.Blend(color);
282  return n;
283  }
284 
286  RGBA BlendWith(const RGBA &color, float alpha) const {
287  auto n = *this;
288  n.Blend(color, alpha);
289  return n;
290  }
291 
293  operator std::string() const {
294  std::stringstream str;
295  str<<std::fixed<<std::setw(8)<<std::setfill('0')<<std::hex<<((const uint32_t)(*this));
296 
297  return str.str();
298  }
299 
300 
301 
304 
307 
310 
313 
314  // Maximum value for this color type, activate after c++14 support
315  // static const Byte Max = 255;
316  };
317 
319  inline std::ostream &operator <<(std::ostream &stream, const RGBA &color) {
320  stream<<(std::string)color;
321 
322  return stream;
323  }
324 
327  inline std::istream &operator>>(std::istream &in, RGBA &color) {
328  while(isspace(in.peek())) in.ignore();
329 
330  if(in.peek()=='#') {
331  color.A=255;
332  in.ignore(1);
333 
334  auto flags=in.flags();
335  in>>std::hex>>color.R>>color.G>>color.B;
336  in.flags(flags);
337  }
338  else {
339  if(in.peek()=='0') {
340  in.ignore();
341  if(in.peek()=='x') {
342  in.ignore();
343  }
344  else {
345  in.clear();
346  }
347  }
348 
349  auto flags=in.flags();
350  in>>std::hex>>(*(unsigned int*)&color);
351  in.flags(flags);
352  }
353  return in;
354  }
355 
358  inline RGBA Blend(RGBA first, const RGBA &second) {
359  first.Blend(second);
360 
361  return first;
362  }
363 
366  inline RGBA Blend(RGBA first, const RGBA &second, float alpha) {
367  first.Blend(second, alpha);
368 
369  return first;
370  }
371 
373  class RGBAf {
374  public:
376  typedef float ChannelType;
377 
378 
380  RGBAf() { }
381 
383  RGBAf(float r, float g, float b, float a=1.f) : R(r), G(g), B(b), A(a) { }
384 
385  // cppcheck-suppress noExplicitConstructor
387  RGBAf(float lum, float a=1.0f) : RGBAf(lum, lum, lum, a) { }
388 
390  explicit RGBAf(double lum, float a=1.0f) : RGBAf((float)lum, (float)lum, (float)lum, a) { }
391 
392  // cppcheck-suppress noExplicitConstructor
394  RGBAf(const RGBA &color) : R(color.R/255.f), G(color.G/255.f), B(color.B/255.f), A(color.A/255.f) { }
395 
397  RGBAf(const RGBA &color, float alpha) : R(color.R/255.f), G(color.G/255.f), B(color.B/255.f), A(color.A/255.f * alpha) { }
398 
400  RGBAf(const RGBA &color, double alpha) : R(color.R/255.f), G(color.G/255.f), B(color.B/255.f), A(float(color.A/255. * alpha)) { }
401 
402  // cppcheck-suppress noExplicitConstructor
404  RGBAf(unsigned color) : RGBAf(RGBA(color)) { }
405 
407  RGBAf(int) = delete;
408 
410  RGBAf(bool) = delete;
411 
413  RGBAf &operator = (const RGBAf &) = default;
414 
416  RGBAf &operator =(const RGBA &color) {
417  R = color.R/255.f;
418  G = color.G/255.f;
419  B = color.B/255.f;
420  A = color.A/255.f;
421 
422  return *this;
423  }
424 
426  RGBAf &operator =(const int &color) {
427  return (*this = RGBA(color));
428  }
429 
431  RGBAf &operator =(float lum) {
432  R = lum;
433  G = lum;
434  B = lum;
435  A = 1;
436 
437  return *this;
438  }
439 
441  RGBAf &operator =(double lum) {
442  R = (float)lum;
443  G = (float)lum;
444  B = (float)lum;
445  A = 1;
446 
447  return *this;
448  }
449 
451  explicit operator RGBA() const {
452  return{Byte(R*255), Byte(G*255), Byte(B*255), Byte(A*255)};
453  }
454 
456  explicit operator int() const {
457  return int(this->operator RGBA());
458  }
459 
460  operator std::string() const {
461  std::stringstream ss;
462 
463  ss<<"("<<R<<", "<<G<<", "<<B<<", "<<A<<")";
464 
465  return ss.str();
466  }
467 
468  RGBAf operator *(const RGBAf &other) const {
469  return {R * other.R, G * other.G, B * other.B, A * other.A};
470  }
471 
472  RGBAf &operator *=(const RGBAf &other) {
473  R *= other.R;
474  G *= other.G;
475  B *= other.B;
476  A *= other.A;
477 
478  return *this;
479  }
480 
482  RGBA Convert() const {
483  return{
484  Byte(R<0.f ? 0 : (R>1.f ? 255 : R*255)),
485  Byte(G<0.f ? 0 : (G>1.f ? 255 : G*255)),
486  Byte(B<0.f ? 0 : (B>1.f ? 255 : B*255)),
487  Byte(A<0.f ? 0 : (A>1.f ? 255 : A*255))
488  };
489  }
490 
493  float Luminance() const {
494  return 0.2126f*R + 0.7151f*G + 0.0722f*B;
495  }
496 
498  bool operator ==(const RGBAf &other) const {
499  return R==other.R && G==other.G && B==other.B && A==other.A;
500  }
501 
503  bool operator !=(const RGBAf &other) const {
504  return R!=other.R || G!=other.G || B!=other.B || A!=other.A;
505  }
506 
509  void Blend(const RGBAf &color) {
510  if(color.A==1.f) {
511  A=1.f;
512  R=color.R;
513  G=color.G;
514  B=color.B;
515  }
516  else {
517  float alpham1=1.f-color.A;
518 
519  R=R*alpham1*A + color.R*color.A;
520  G=G*alpham1*A + color.G*color.A;
521  B=B*alpham1*A + color.B*color.A;
522  A = color.A + A * alpham1;
523 
524  R /= A;
525  G /= A;
526  B /= A;
527  }
528  }
529 
531  void Blend(const RGBAf &color, float factor) {
532  if(color.A==1.f) {
533  A=1.f;
534  R=color.R;
535  G=color.G;
536  B=color.B;
537  }
538  else {
539  float a = color.A*factor;
540  float alpham1=1.f-a;
541 
542  R=R*alpham1 * A + color.R * a;
543  G=G*alpham1 * A + color.G * a;
544  B=B*alpham1 * A + color.B * a;
545  A = color.A + A * alpham1;
546 
547  R /= A;
548  G /= A;
549  B /= A;
550  }
551  }
552 
555  void Slide(const RGBAf &color, float factor) {
556  auto ma = 1 - factor;
557 
558  R = ma * R + factor * color.R;
559  G = ma * G + factor * color.G;
560  B = ma * B + factor * color.B;
561  A = ma * A + factor * color.A;
562  }
563 
566  void Slide(const RGBAf &color, float factor_color, float factor_alpha) {
567  auto mc = 1 - factor_color;
568  auto ma = 1 - factor_alpha;
569 
570  R = mc * R + factor_color * color.R;
571  G = mc * G + factor_color * color.G;
572  B = mc * B + factor_color * color.B;
573  A = ma * A + factor_alpha * color.A;
574  }
575 
578  void Slide(const RGBAf &color, const RGBAf &factor) {
579  R = (1 - factor.R) * R + factor.R * color.R;
580  G = (1 - factor.G) * G + factor.G * color.G;
581  B = (1 - factor.B) * B + factor.B * color.B;
582  A = (1 - factor.A) * A + factor.A * color.A;
583  }
584 
585  union {
586  struct {
588  float R;
589 
591  float G;
592 
594  float B;
595 
597  float A;
598  };
599 
601  float Vector[4];
602  };
603 
604  // Maximum value for this color type, activate after c++14 support
605  // static const float Max = 1.0f;
606  };
607 
609  inline std::ostream &operator <<(std::ostream &stream, const RGBAf &color) {
610  stream<<(std::string)color;
611 
612  return stream;
613  }
614 
617  namespace Color {
618  constexpr RGBA Purple = 0xff9c1e7e;
619  constexpr RGBA Green = 0xff1ab015;
620  constexpr RGBA Blue = 0xffdf4303;
621  constexpr RGBA Pink = 0xffc081ff;
622  constexpr RGBA Brown = 0xff003765;
623  constexpr RGBA Red = 0xff0000e5;
624  constexpr RGBA LightBlue = 0xfffcd095;
625  constexpr RGBA Teal = 0xff869302;
626  constexpr RGBA Orange = 0xff0673f9;
627  constexpr RGBA LightGreen = 0xff7bf996;
628  constexpr RGBA Magenta = 0xff7800c2;
629  constexpr RGBA Yellow = 0xff14ffff;
630  constexpr RGBA SkyBlue = 0xfffdbb75;
631  constexpr RGBA Grey = 0xff919592;
632  constexpr RGBA LimeGreen = 0xff05fe89;
633  constexpr RGBA LightPurple = 0xfff677bf;
634  constexpr RGBA Violet = 0xffea0e9a;
635  constexpr RGBA DarkGreen = 0xff003503;
636  constexpr RGBA Turquoise = 0xffacc206;
637  constexpr RGBA Lavender = 0xffef9fc7;
638  constexpr RGBA DarkBlue = 0xff5b0300;
639  constexpr RGBA Tan = 0xff6fb2d1;
640  constexpr RGBA Cyan = 0xffffff00;
641  constexpr RGBA Aqua = 0xffc9ea13;
642  constexpr RGBA ForestGreen = 0xff0c4706;
643  constexpr RGBA Mauve = 0xff8171ae;
644  constexpr RGBA DarkPurple = 0xff3e0635;
645  constexpr RGBA BrightGreen = 0xff07ff01;
646  constexpr RGBA Maroon = 0xff210065;
647  constexpr RGBA Olive = 0xff0e756e;
648  constexpr RGBA Salmon = 0xff6c79ff;
649  constexpr RGBA Beige = 0xffa6dae6;
650  constexpr RGBA RoyalBlue = 0xffaa0405;
651  constexpr RGBA NavyBlue = 0xff461100;
652  constexpr RGBA Lilac = 0xfffda2ce;
653  constexpr RGBA Black = 0xff000000;
654  constexpr RGBA HotPink = 0xff8d02ff;
655  constexpr RGBA LightBrown = 0xff5081ad;
656  constexpr RGBA PaleGreen = 0xffb5fdc7;
657  constexpr RGBA Peach = 0xff7cb0ff;
658  constexpr RGBA OliveGreen = 0xff047a67;
659  constexpr RGBA DarkPink = 0xff6b41cb;
660  constexpr RGBA Periwinkle = 0xfffe828e;
661  constexpr RGBA SeaGreen = 0xffa1fc53;
662  constexpr RGBA Lime = 0xff32ffaa;
663  constexpr RGBA Indigo = 0xff820238;
664  constexpr RGBA Mustard = 0xff01b3ce;
665  constexpr RGBA LightPink = 0xffdfd1ff;
666  constexpr RGBA Rose = 0xff7562cf;
667  constexpr RGBA BrightBlue = 0xfffc6501;
668  constexpr RGBA NeonGreen = 0xff0cff0c;
669  constexpr RGBA BurntOrange = 0xff014ec0;
670  constexpr RGBA Aquamarine = 0xffb2d804;
671  constexpr RGBA Navy = 0xff3e1501;
672  constexpr RGBA GrassGreen = 0xff0b9b3f;
673  constexpr RGBA PaleBlue = 0xfffefed0;
674  constexpr RGBA DarkRed = 0xff000084;
675  constexpr RGBA BrightPurple = 0xfffd03be;
676  constexpr RGBA YellowGreen = 0xff2dfbc0;
677  constexpr RGBA BabyBlue = 0xfffecfa2;
678  constexpr RGBA Gold = 0xff0cb4db;
679  constexpr RGBA MintGreen = 0xff9fff8f;
680  constexpr RGBA Plum = 0xff410f58;
681  constexpr RGBA RoyalPurple = 0xff6e004b;
682  constexpr RGBA BrickRed = 0xff02148f;
683  constexpr RGBA DarkTeal = 0xff4e4d01;
684  constexpr RGBA Burgundy = 0xff230061;
685  constexpr RGBA Khaki = 0xff62a6aa;
686  constexpr RGBA BlueGreen = 0xff6d7e13;
687  constexpr RGBA SeafoamGreen = 0xffabf97a;
688  constexpr RGBA PeaGreen = 0xff12ab8e;
689  constexpr RGBA Taupe = 0xff81a2b9;
690  constexpr RGBA DarkBrown = 0xff021c34;
691  constexpr RGBA DeepPurple = 0xff3f0136;
692  constexpr RGBA Chartreuse = 0xff0af8c1;
693  constexpr RGBA BrightPink = 0xffb101fe;
694  constexpr RGBA LightOrange = 0xff48aafd;
695  constexpr RGBA Mint = 0xffb0fe9f;
696  constexpr RGBA PastelGreen = 0xff9dffb0;
697  constexpr RGBA Sand = 0xff76cae2;
698  constexpr RGBA DarkOrange = 0xff0251c6;
699  constexpr RGBA SpringGreen = 0xff71f9a9;
700  constexpr RGBA Puce = 0xff527ea5;
701  constexpr RGBA Seafoam = 0xffadf980;
702  constexpr RGBA GreyBlue = 0xffa48b6b;
703  constexpr RGBA ArmyGreen = 0xff165d4b;
704  constexpr RGBA DarkGrey = 0xff373736;
705  constexpr RGBA DarkYellow = 0xff0ab6d5;
706  constexpr RGBA Goldenrod = 0xff05c2fa;
707  constexpr RGBA Slate = 0xff726551;
708  constexpr RGBA LightTeal = 0xffc1e490;
709  constexpr RGBA Rust = 0xff093ca8;
710  constexpr RGBA DeepBlue = 0xff730204;
711  constexpr RGBA PalePink = 0xffdccfff;
712  constexpr RGBA Cerulean = 0xffd18504;
713  constexpr RGBA LightRed = 0xff4c47ff;
714  constexpr RGBA MustardYellow = 0xff0abdd2;
715  constexpr RGBA Ochre = 0xff0590bf;
716  constexpr RGBA PaleYellow = 0xff84ffff;
717  constexpr RGBA Crimson = 0xff0f008c;
718  constexpr RGBA Fuchsia = 0xffd90ded;
719  constexpr RGBA HunterGreen = 0xff08400b;
720  constexpr RGBA BlueGrey = 0xff8e7c60;
721  constexpr RGBA SlateBlue = 0xff997c5b;
722  constexpr RGBA PalePurple = 0xffd490b7;
723  constexpr RGBA SeaBlue = 0xff957404;
724  constexpr RGBA PinkishPurple = 0xffd748d6;
725  constexpr RGBA LightGrey = 0xffd6dcd8;
726  constexpr RGBA LeafGreen = 0xff04a95c;
727  constexpr RGBA LightYellow = 0xff7afeff;
728  constexpr RGBA Eggplant = 0xff350838;
729  constexpr RGBA SteelBlue = 0xff9a7d5a;
730  constexpr RGBA MossGreen = 0xff388b65;
731  constexpr RGBA White = 0xffffffff;
732  constexpr RGBA GreyGreen = 0xff739b78;
733  constexpr RGBA Sage = 0xff73ae87;
734  constexpr RGBA Brick = 0xff2336a0;
735  constexpr RGBA BurntSienna = 0xff0f4eb0;
736  constexpr RGBA ReddishBrown = 0xff0a2b7f;
737  constexpr RGBA Cream = 0xffc2ffff;
738  constexpr RGBA Coral = 0xff505afc;
739  constexpr RGBA OceanBlue = 0xff9c7103;
740  constexpr RGBA Greenish = 0xff68a340;
741  constexpr RGBA DarkMagenta = 0xff560096;
742  constexpr RGBA RedOrange = 0xff063cfd;
743  constexpr RGBA BluishPurple = 0xffe73b70;
744  constexpr RGBA MidnightBlue = 0xff350002;
745  constexpr RGBA LightViolet = 0xfffcb4d6;
746  constexpr RGBA DustyRose = 0xff7a73c0;
747  constexpr RGBA GreenishYellow = 0xff02fdcd;
748  constexpr RGBA YellowishGreen = 0xff16ddb0;
749  constexpr RGBA PurplishBlue = 0xfff91e60;
750  constexpr RGBA GreyishBlue = 0xff9d815e;
751  constexpr RGBA Grape = 0xff61346c;
752  constexpr RGBA LightOlive = 0xff69bfac;
753  constexpr RGBA CornflowerBlue = 0xffd77051;
754  constexpr RGBA PinkishRed = 0xff450cf1;
755  constexpr RGBA BrightRed = 0xff0d00ff;
756  constexpr RGBA Azure = 0xfff39a06;
757  constexpr RGBA BluePurple = 0xffce2957;
758  constexpr RGBA DarkTurquoise = 0xff5a5c04;
759  constexpr RGBA ElectricBlue = 0xffff5206;
760  constexpr RGBA OffWhite = 0xffe4ffff;
761  constexpr RGBA PowderBlue = 0xfffcd1b1;
762  constexpr RGBA Wine = 0xff3f0180;
763  constexpr RGBA DullGreen = 0xff62a674;
764  constexpr RGBA AppleGreen = 0xff26cd76;
765  constexpr RGBA LightTurquoise = 0xffccf47e;
766  constexpr RGBA NeonPurple = 0xfffe13bc;
767  constexpr RGBA Cobalt = 0xff8f481e;
768  constexpr RGBA Pinkish = 0xff7e6ad4;
769  constexpr RGBA OliveDrab = 0xff32766f;
770  constexpr RGBA DarkCyan = 0xff8a880a;
771  constexpr RGBA PurpleBlue = 0xffe92d63;
772  constexpr RGBA DarkViolet = 0xff3f0134;
773  constexpr RGBA DarkLavender = 0xff986785;
774  constexpr RGBA ForrestGreen = 0xff064415;
775  constexpr RGBA PaleOrange = 0xff56a7ff;
776  constexpr RGBA GreenishBlue = 0xff878b0b;
777  constexpr RGBA DarkTan = 0xff4a88af;
778  constexpr RGBA GreenBlue = 0xff8bb406;
779  constexpr RGBA BluishGreen = 0xff74a610;
780  constexpr RGBA PastelBlue = 0xfffebfa2;
781  constexpr RGBA Moss = 0xff589976;
782  constexpr RGBA Grass = 0xff2dac5c;
783  constexpr RGBA DeepPink = 0xff6201cb;
784  constexpr RGBA BloodRed = 0xff020098;
785  constexpr RGBA SageGreen = 0xff78b388;
786  constexpr RGBA AquaBlue = 0xffe9d802;
787  constexpr RGBA Terracotta = 0xff4166ca;
788  constexpr RGBA PastelPurple = 0xffffa0ca;
789  constexpr RGBA Sienna = 0xff1e56a9;
790  constexpr RGBA DarkOlive = 0xff023e37;
791  constexpr RGBA GreenYellow = 0xff27ffc9;
792  constexpr RGBA Scarlet = 0xff1901be;
793  constexpr RGBA GreyishGreen = 0xff7da682;
794  constexpr RGBA Chocolate = 0xff021c3d;
795  constexpr RGBA BlueViolet = 0xffe9065d;
796  constexpr RGBA BabyPink = 0xffceb7ff;
797  constexpr RGBA Charcoal = 0xff373834;
798  constexpr RGBA PineGreen = 0xff1e480a;
799  constexpr RGBA Pumpkin = 0xff0177e1;
800  constexpr RGBA GreenishBrown = 0xff126169;
801  constexpr RGBA RedBrown = 0xff162e8b;
802  constexpr RGBA BrownishGreen = 0xff096e6a;
803  constexpr RGBA Tangerine = 0xff0894ff;
804  constexpr RGBA SalmonPink = 0xff7c7bfe;
805  constexpr RGBA AquaGreen = 0xff93e112;
806  constexpr RGBA Raspberry = 0xff4901b0;
807  constexpr RGBA GreyishPurple = 0xff917188;
808  constexpr RGBA RosePink = 0xff9a87f7;
809  constexpr RGBA NeonPink = 0xff9a01fe;
810  constexpr RGBA CobaltBlue = 0xffa70a03;
811  constexpr RGBA OrangeBrown = 0xff0064be;
812  constexpr RGBA DeepRed = 0xff00029a;
813  constexpr RGBA OrangeRed = 0xff1e41fd;
814  constexpr RGBA DirtyYellow = 0xff0ac5cd;
815  constexpr RGBA Orchid = 0xffc475c8;
816  constexpr RGBA ReddishPink = 0xff542cfe;
817  constexpr RGBA ReddishPurple = 0xff510991;
818  constexpr RGBA YellowOrange = 0xff01b0fc;
819  constexpr RGBA LightCyan = 0xfffcffac;
820  constexpr RGBA Sky = 0xfffcca82;
821  constexpr RGBA LightMagenta = 0xfff75ffa;
822  constexpr RGBA PaleRed = 0xff4d54d9;
823  constexpr RGBA Emerald = 0xff49a001;
824  constexpr RGBA DarkBeige = 0xff6293ac;
825  constexpr RGBA Jade = 0xff74a71f;
826  constexpr RGBA GreenishGrey = 0xff8dae96;
827  constexpr RGBA DarkSalmon = 0xff535ac8;
828  constexpr RGBA PurplishPink = 0xffae5dce;
829  constexpr RGBA DarkAqua = 0xff6b6905;
830  constexpr RGBA BrownishOrange = 0xff2377cb;
831  constexpr RGBA LightOliveGreen = 0xff5cbea4;
832  constexpr RGBA LightAqua = 0xffdbff8c;
833  constexpr RGBA Clay = 0xff506ab6;
834  constexpr RGBA BurntUmber = 0xff0e45a0;
835  constexpr RGBA DullBlue = 0xff9c7549;
836  constexpr RGBA PaleBrown = 0xff6e91b1;
837  constexpr RGBA EmeraldGreen = 0xff1e8f02;
838  constexpr RGBA Brownish = 0xff576d9c;
839  constexpr RGBA Mud = 0xff125c73;
840  constexpr RGBA DarkRose = 0xff5d48b5;
841  constexpr RGBA BrownishRed = 0xff23369e;
842  constexpr RGBA PinkPurple = 0xffda4bdb;
843  constexpr RGBA PinkyPurple = 0xffbe4cc9;
844  constexpr RGBA CamoGreen = 0xff256552;
845  constexpr RGBA FadedGreen = 0xff74b27b;
846  constexpr RGBA DustyPink = 0xff948ad5;
847  constexpr RGBA PurplePink = 0xffd83fe0;
848  constexpr RGBA DeepGreen = 0xff0f5902;
849  constexpr RGBA ReddishOrange = 0xff1c48f8;
850  constexpr RGBA Mahogany = 0xff00014a;
851  constexpr RGBA Aubergine = 0xff34073d;
852  constexpr RGBA DullPink = 0xff9d86d5;
853  constexpr RGBA Evergreen = 0xff2a4705;
854  constexpr RGBA DarkSkyBlue = 0xffe48e44;
855  constexpr RGBA IceBlue = 0xfffeffd7;
856  constexpr RGBA LightTan = 0xffaceefb;
857  constexpr RGBA DirtyGreen = 0xff2c7e66;
858  constexpr RGBA NeonBlue = 0xffffd904;
859  constexpr RGBA Denim = 0xff8c633b;
860  constexpr RGBA Eggshell = 0xffd4ffff;
861  constexpr RGBA JungleGreen = 0xff438204;
862  constexpr RGBA DarkPeach = 0xff5d7ede;
863  constexpr RGBA Umber = 0xff0064b2;
864  constexpr RGBA BrightYellow = 0xff01fdff;
865  constexpr RGBA DustyBlue = 0xffad865a;
866  constexpr RGBA ElectricGreen = 0xff0dfc21;
867  constexpr RGBA LighterGreen = 0xff63fd75;
868  constexpr RGBA SlateGrey = 0xff6d6559;
869  constexpr RGBA TealGreen = 0xff6fa325;
870  constexpr RGBA MarineBlue = 0xff6a3801;
871  constexpr RGBA Avocado = 0xff34b190;
872  constexpr RGBA Forest = 0xff09550b;
873  constexpr RGBA PeaSoup = 0xff019992;
874  constexpr RGBA Lemon = 0xff52fffd;
875  constexpr RGBA MuddyGreen = 0xff327465;
876  constexpr RGBA Marigold = 0xff06c0fc;
877  constexpr RGBA Ocean = 0xff927b01;
878  constexpr RGBA LightMauve = 0xffa192c2;
879  constexpr RGBA Bordeaux = 0xff2c007b;
880  constexpr RGBA Pistachio = 0xff8bfac0;
881  constexpr RGBA LemonYellow = 0xff38fffd;
882  constexpr RGBA RedViolet = 0xff68019e;
883  constexpr RGBA DuskyPink = 0xff8b7acc;
884  constexpr RGBA Dirt = 0xff456e8a;
885  constexpr RGBA Pine = 0xff345d2b;
886  constexpr RGBA Vermillion = 0xff0c32f4;
887  constexpr RGBA Amber = 0xff08b3fe;
888  constexpr RGBA Silver = 0xffc7c9c5;
889  constexpr RGBA Coffee = 0xff4c81a6;
890  constexpr RGBA Sepia = 0xff2b5e98;
891  constexpr RGBA FadedRed = 0xff4e49d3;
892  constexpr RGBA CanaryYellow = 0xff40feff;
893  constexpr RGBA CherryRed = 0xff2a02f7;
894  constexpr RGBA Ocre = 0xff049cc6;
895  constexpr RGBA Ivory = 0xffcbffff;
896  constexpr RGBA Copper = 0xff2563b6;
897  constexpr RGBA DarkLime = 0xff01b784;
898  constexpr RGBA Strawberry = 0xff4329fb;
899  constexpr RGBA DarkNavy = 0xff350400;
900  constexpr RGBA Cinnamon = 0xff064fac;
901  constexpr RGBA CloudyBlue = 0xffd9c2ac;
902 
903  inline const std::vector<std::pair<std::string, RGBA>> &Names() {
904  static std::vector<std::pair<std::string, RGBA>> names = {
905  {"Purple", Purple},
906  {"Green", Green},
907  {"Blue", Blue},
908  {"Pink", Pink},
909  {"Brown", Brown},
910  {"Red", Red},
911  {"Light Blue", LightBlue},
912  {"Teal", Teal},
913  {"Orange", Orange},
914  {"Light Green", LightGreen},
915  {"Magenta", Magenta},
916  {"Yellow", Yellow},
917  {"Sky Blue", SkyBlue},
918  {"Grey", Grey},
919  {"Lime Green", LimeGreen},
920  {"Light Purple", LightPurple},
921  {"Violet", Violet},
922  {"Dark Green", DarkGreen},
923  {"Turquoise", Turquoise},
924  {"Lavender", Lavender},
925  {"Dark Blue", DarkBlue},
926  {"Tan", Tan},
927  {"Cyan", Cyan},
928  {"Aqua", Aqua},
929  {"Forest Green", ForestGreen},
930  {"Mauve", Mauve},
931  {"Dark Purple", DarkPurple},
932  {"Bright Green", BrightGreen},
933  {"Maroon", Maroon},
934  {"Olive", Olive},
935  {"Salmon", Salmon},
936  {"Beige", Beige},
937  {"Royal Blue", RoyalBlue},
938  {"Navy Blue", NavyBlue},
939  {"Lilac", Lilac},
940  {"Black", Black},
941  {"Hot Pink", HotPink},
942  {"Light Brown", LightBrown},
943  {"Pale Green", PaleGreen},
944  {"Peach", Peach},
945  {"Olive Green", OliveGreen},
946  {"Dark Pink", DarkPink},
947  {"Periwinkle", Periwinkle},
948  {"Sea Green", SeaGreen},
949  {"Lime", Lime},
950  {"Indigo", Indigo},
951  {"Mustard", Mustard},
952  {"Light Pink", LightPink},
953  {"Rose", Rose},
954  {"Bright Blue", BrightBlue},
955  {"Neon Green", NeonGreen},
956  {"Burnt Orange", BurntOrange},
957  {"Aquamarine", Aquamarine},
958  {"Navy", Navy},
959  {"Grass Green", GrassGreen},
960  {"Pale Blue", PaleBlue},
961  {"Dark Red", DarkRed},
962  {"Bright Purple", BrightPurple},
963  {"Yellow Green", YellowGreen},
964  {"Baby Blue", BabyBlue},
965  {"Gold", Gold},
966  {"Mint Green", MintGreen},
967  {"Plum", Plum},
968  {"Royal Purple", RoyalPurple},
969  {"Brick Red", BrickRed},
970  {"Dark Teal", DarkTeal},
971  {"Burgundy", Burgundy},
972  {"Khaki", Khaki},
973  {"Blue Green", BlueGreen},
974  {"Seafoam Green", SeafoamGreen},
975  {"Pea Green", PeaGreen},
976  {"Taupe", Taupe},
977  {"Dark Brown", DarkBrown},
978  {"Deep Purple", DeepPurple},
979  {"Chartreuse", Chartreuse},
980  {"Bright Pink", BrightPink},
981  {"Light Orange", LightOrange},
982  {"Mint", Mint},
983  {"Pastel Green", PastelGreen},
984  {"Sand", Sand},
985  {"Dark Orange", DarkOrange},
986  {"Spring Green", SpringGreen},
987  {"Puce", Puce},
988  {"Seafoam", Seafoam},
989  {"Grey Blue", GreyBlue},
990  {"Army Green", ArmyGreen},
991  {"Dark Grey", DarkGrey},
992  {"Dark Yellow", DarkYellow},
993  {"Goldenrod", Goldenrod},
994  {"Slate", Slate},
995  {"Light Teal", LightTeal},
996  {"Rust", Rust},
997  {"Deep Blue", DeepBlue},
998  {"Pale Pink", PalePink},
999  {"Cerulean", Cerulean},
1000  {"Light Red", LightRed},
1001  {"Mustard Yellow", MustardYellow},
1002  {"Ochre", Ochre},
1003  {"Pale Yellow", PaleYellow},
1004  {"Crimson", Crimson},
1005  {"Fuchsia", Fuchsia},
1006  {"Hunter Green", HunterGreen},
1007  {"Blue Grey", BlueGrey},
1008  {"Slate Blue", SlateBlue},
1009  {"Pale Purple", PalePurple},
1010  {"Sea Blue", SeaBlue},
1011  {"Pinkish Purple", PinkishPurple},
1012  {"Light Grey", LightGrey},
1013  {"Leaf Green", LeafGreen},
1014  {"Light Yellow", LightYellow},
1015  {"Eggplant", Eggplant},
1016  {"Steel Blue", SteelBlue},
1017  {"Moss Green", MossGreen},
1018  {"White", White},
1019  {"Grey Green", GreyGreen},
1020  {"Sage", Sage},
1021  {"Brick", Brick},
1022  {"Burnt Sienna", BurntSienna},
1023  {"Reddish Brown", ReddishBrown},
1024  {"Cream", Cream},
1025  {"Coral", Coral},
1026  {"Ocean Blue", OceanBlue},
1027  {"Greenish", Greenish},
1028  {"Dark Magenta", DarkMagenta},
1029  {"Red Orange", RedOrange},
1030  {"Bluish Purple", BluishPurple},
1031  {"Midnight Blue", MidnightBlue},
1032  {"Light Violet", LightViolet},
1033  {"Dusty Rose", DustyRose},
1034  {"Greenish Yellow", GreenishYellow},
1035  {"Yellowish Green", YellowishGreen},
1036  {"Purplish Blue", PurplishBlue},
1037  {"Greyish Blue", GreyishBlue},
1038  {"Grape", Grape},
1039  {"Light Olive", LightOlive},
1040  {"Cornflower Blue", CornflowerBlue},
1041  {"Pinkish Red", PinkishRed},
1042  {"Bright Red", BrightRed},
1043  {"Azure", Azure},
1044  {"Blue Purple", BluePurple},
1045  {"Dark Turquoise", DarkTurquoise},
1046  {"Electric Blue", ElectricBlue},
1047  {"Off White", OffWhite},
1048  {"Powder Blue", PowderBlue},
1049  {"Wine", Wine},
1050  {"Dull Green", DullGreen},
1051  {"Apple Green", AppleGreen},
1052  {"Light Turquoise", LightTurquoise},
1053  {"Neon Purple", NeonPurple},
1054  {"Cobalt", Cobalt},
1055  {"Pinkish", Pinkish},
1056  {"Olive Drab", OliveDrab},
1057  {"Dark Cyan", DarkCyan},
1058  {"Purple Blue", PurpleBlue},
1059  {"Dark Violet", DarkViolet},
1060  {"Dark Lavender", DarkLavender},
1061  {"Forrest Green", ForrestGreen},
1062  {"Pale Orange", PaleOrange},
1063  {"Greenish Blue", GreenishBlue},
1064  {"Dark Tan", DarkTan},
1065  {"Green Blue", GreenBlue},
1066  {"Bluish Green", BluishGreen},
1067  {"Pastel Blue", PastelBlue},
1068  {"Moss", Moss},
1069  {"Grass", Grass},
1070  {"Deep Pink", DeepPink},
1071  {"Blood Red", BloodRed},
1072  {"Sage Green", SageGreen},
1073  {"Aqua Blue", AquaBlue},
1074  {"Terracotta", Terracotta},
1075  {"Pastel Purple", PastelPurple},
1076  {"Sienna", Sienna},
1077  {"Dark Olive", DarkOlive},
1078  {"Green Yellow", GreenYellow},
1079  {"Scarlet", Scarlet},
1080  {"Greyish Green", GreyishGreen},
1081  {"Chocolate", Chocolate},
1082  {"Blue Violet", BlueViolet},
1083  {"Baby Pink", BabyPink},
1084  {"Charcoal", Charcoal},
1085  {"Pine Green", PineGreen},
1086  {"Pumpkin", Pumpkin},
1087  {"Greenish Brown", GreenishBrown},
1088  {"Red Brown", RedBrown},
1089  {"Brownish Green", BrownishGreen},
1090  {"Tangerine", Tangerine},
1091  {"Salmon Pink", SalmonPink},
1092  {"Aqua Green", AquaGreen},
1093  {"Raspberry", Raspberry},
1094  {"Greyish Purple", GreyishPurple},
1095  {"Rose Pink", RosePink},
1096  {"Neon Pink", NeonPink},
1097  {"Cobalt Blue", CobaltBlue},
1098  {"Orange Brown", OrangeBrown},
1099  {"Deep Red", DeepRed},
1100  {"Orange Red", OrangeRed},
1101  {"Dirty Yellow", DirtyYellow},
1102  {"Orchid", Orchid},
1103  {"Reddish Pink", ReddishPink},
1104  {"Reddish Purple", ReddishPurple},
1105  {"Yellow Orange", YellowOrange},
1106  {"Light Cyan", LightCyan},
1107  {"Sky", Sky},
1108  {"Light Magenta", LightMagenta},
1109  {"Pale Red", PaleRed},
1110  {"Emerald", Emerald},
1111  {"Dark Beige", DarkBeige},
1112  {"Jade", Jade},
1113  {"Greenish Grey", GreenishGrey},
1114  {"Dark Salmon", DarkSalmon},
1115  {"Purplish Pink", PurplishPink},
1116  {"Dark Aqua", DarkAqua},
1117  {"Brownish Orange", BrownishOrange},
1118  {"Light Olive Green", LightOliveGreen},
1119  {"Light Aqua", LightAqua},
1120  {"Clay", Clay},
1121  {"Burnt Umber", BurntUmber},
1122  {"Dull Blue", DullBlue},
1123  {"Pale Brown", PaleBrown},
1124  {"Emerald Green", EmeraldGreen},
1125  {"Brownish", Brownish},
1126  {"Mud", Mud},
1127  {"Dark Rose", DarkRose},
1128  {"Brownish Red", BrownishRed},
1129  {"Pink Purple", PinkPurple},
1130  {"Pinky Purple", PinkyPurple},
1131  {"Camo Green", CamoGreen},
1132  {"Faded Green", FadedGreen},
1133  {"Dusty Pink", DustyPink},
1134  {"Purple Pink", PurplePink},
1135  {"Deep Green", DeepGreen},
1136  {"Reddish Orange", ReddishOrange},
1137  {"Mahogany", Mahogany},
1138  {"Aubergine", Aubergine},
1139  {"Dull Pink", DullPink},
1140  {"Evergreen", Evergreen},
1141  {"Dark Sky Blue", DarkSkyBlue},
1142  {"Ice Blue", IceBlue},
1143  {"Light Tan", LightTan},
1144  {"Dirty Green", DirtyGreen},
1145  {"Neon Blue", NeonBlue},
1146  {"Denim", Denim},
1147  {"Eggshell", Eggshell},
1148  {"Jungle Green", JungleGreen},
1149  {"Dark Peach", DarkPeach},
1150  {"Umber", Umber},
1151  {"Bright Yellow", BrightYellow},
1152  {"Dusty Blue", DustyBlue},
1153  {"Electric Green", ElectricGreen},
1154  {"Lighter Green", LighterGreen},
1155  {"Slate Grey", SlateGrey},
1156  {"Teal Green", TealGreen},
1157  {"Marine Blue", MarineBlue},
1158  {"Avocado", Avocado},
1159  {"Forest", Forest},
1160  {"Pea Soup", PeaSoup},
1161  {"Lemon", Lemon},
1162  {"Muddy Green", MuddyGreen},
1163  {"Marigold", Marigold},
1164  {"Ocean", Ocean},
1165  {"Light Mauve", LightMauve},
1166  {"Bordeaux", Bordeaux},
1167  {"Pistachio", Pistachio},
1168  {"Lemon Yellow", LemonYellow},
1169  {"Red Violet", RedViolet},
1170  {"Dusky Pink", DuskyPink},
1171  {"Dirt", Dirt},
1172  {"Pine", Pine},
1173  {"Vermillion", Vermillion},
1174  {"Amber", Amber},
1175  {"Silver", Silver},
1176  {"Coffee", Coffee},
1177  {"Sepia", Sepia},
1178  {"Faded Red", FadedRed},
1179  {"Canary Yellow", CanaryYellow},
1180  {"Cherry Red", CherryRed},
1181  {"Ocre", Ocre},
1182  {"Ivory", Ivory},
1183  {"Copper", Copper},
1184  {"Dark Lime", DarkLime},
1185  {"Strawberry", Strawberry},
1186  {"Dark Navy", DarkNavy},
1187  {"Cinnamon", Cinnamon},
1188  {"Cloudy Blue", CloudyBlue},
1189  };
1190 
1191  return names;
1192  }
1193  }
1194 } }
Gorgon::Graphics::Color::RedViolet
constexpr RGBA RedViolet
Definition: Color.h:882
Gorgon::Graphics::Color::GreenishYellow
constexpr RGBA GreenishYellow
Definition: Color.h:747
Gorgon::Graphics::Color::SpringGreen
constexpr RGBA SpringGreen
Definition: Color.h:699
Gorgon::Graphics::Color::CornflowerBlue
constexpr RGBA CornflowerBlue
Definition: Color.h:753
Gorgon::Graphics::Color::DustyRose
constexpr RGBA DustyRose
Definition: Color.h:746
Gorgon::Graphics::Color::Silver
constexpr RGBA Silver
Definition: Color.h:888
Gorgon::Graphics::Color::TealGreen
constexpr RGBA TealGreen
Definition: Color.h:869
Gorgon::Graphics::Color::Aubergine
constexpr RGBA Aubergine
Definition: Color.h:851
Gorgon::Graphics::Color::PeaGreen
constexpr RGBA PeaGreen
Definition: Color.h:688
Gorgon::Graphics::Color::Pinkish
constexpr RGBA Pinkish
Definition: Color.h:768
Gorgon::Graphics::Color::SalmonPink
constexpr RGBA SalmonPink
Definition: Color.h:804
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &other, int newalpha)
Copy constructor with new alpha value.
Definition: Color.h:107
Gorgon::Graphics::Color::GreenishGrey
constexpr RGBA GreenishGrey
Definition: Color.h:826
Gorgon::Graphics::RGBA::RGBA
constexpr RGBA(int color)
Conversion from integer.
Definition: Color.h:139
Gorgon::Graphics::RGBA
This class represents a color information.
Definition: Color.h:91
Gorgon::Graphics::Color::PinkPurple
constexpr RGBA PinkPurple
Definition: Color.h:842
Gorgon::Graphics::Color::Crimson
constexpr RGBA Crimson
Definition: Color.h:717
Gorgon::Graphics::Color::Terracotta
constexpr RGBA Terracotta
Definition: Color.h:787
Gorgon::Graphics::Color::LeafGreen
constexpr RGBA LeafGreen
Definition: Color.h:726
Gorgon::Graphics::Color::Lime
constexpr RGBA Lime
Definition: Color.h:662
Gorgon::Graphics::RGBA::Blend
void Blend(const RGBA &color)
Blends the given color into this one.
Definition: Color.h:248
Gorgon::Graphics::Color::GreyishPurple
constexpr RGBA GreyishPurple
Definition: Color.h:807
Gorgon::Graphics::Color::Greenish
constexpr RGBA Greenish
Definition: Color.h:740
Gorgon::Graphics::Color::PinkishPurple
constexpr RGBA PinkishPurple
Definition: Color.h:724
Gorgon::Graphics::Color::LightTan
constexpr RGBA LightTan
Definition: Color.h:856
Gorgon::Graphics::Color::Copper
constexpr RGBA Copper
Definition: Color.h:896
Gorgon::Graphics::Color::Brownish
constexpr RGBA Brownish
Definition: Color.h:838
Gorgon::Graphics::Color::Strawberry
constexpr RGBA Strawberry
Definition: Color.h:898
Gorgon::Graphics::RGBA::RGBA
RGBA(double lum)
Conversion from float. Assumes the given float value is a 0 to 1 luminance. Sets alpha to 255.
Definition: Color.h:158
Gorgon::Graphics::Color::DustyPink
constexpr RGBA DustyPink
Definition: Color.h:846
Gorgon::Graphics::RGBA::ChannelType
Byte ChannelType
Data type for each channel.
Definition: Color.h:94
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &other, Byte newalpha)
Copy constructor with new alpha value.
Definition: Color.h:104
Gorgon::Graphics::Color::PurplePink
constexpr RGBA PurplePink
Definition: Color.h:847
Gorgon::Graphics::Color::Seafoam
constexpr RGBA Seafoam
Definition: Color.h:701
Gorgon::Graphics::RGBAf::operator==
bool operator==(const RGBAf &other) const
Compares two colors.
Definition: Color.h:498
Gorgon::Graphics::Color::Salmon
constexpr RGBA Salmon
Definition: Color.h:648
Gorgon::Graphics::Color::BlueGrey
constexpr RGBA BlueGrey
Definition: Color.h:720
Gorgon::Graphics::Color::Azure
constexpr RGBA Azure
Definition: Color.h:756
Gorgon::Graphics::Color::Dirt
constexpr RGBA Dirt
Definition: Color.h:884
Gorgon::Graphics::Color::Turquoise
constexpr RGBA Turquoise
Definition: Color.h:636
Gorgon::Graphics::Color::LightTeal
constexpr RGBA LightTeal
Definition: Color.h:708
Gorgon::Graphics::Color::Mauve
constexpr RGBA Mauve
Definition: Color.h:643
Gorgon::Graphics::RGBAf::ChannelType
float ChannelType
Data type for each channel.
Definition: Color.h:376
Gorgon::Graphics::Color::PurplishBlue
constexpr RGBA PurplishBlue
Definition: Color.h:749
Gorgon::Graphics::Color::FadedRed
constexpr RGBA FadedRed
Definition: Color.h:891
Gorgon::Graphics::Color::SageGreen
constexpr RGBA SageGreen
Definition: Color.h:785
Gorgon::Graphics::ColorMode
ColorMode
Color modes for images.
Definition: Color.h:16
Gorgon::Graphics::Color::LightRed
constexpr RGBA LightRed
Definition: Color.h:713
Gorgon::Graphics::Color::Rust
constexpr RGBA Rust
Definition: Color.h:709
Gorgon::Graphics::Color::ElectricBlue
constexpr RGBA ElectricBlue
Definition: Color.h:759
Gorgon::Graphics::Color::NeonBlue
constexpr RGBA NeonBlue
Definition: Color.h:858
Gorgon::Graphics::Color::Rose
constexpr RGBA Rose
Definition: Color.h:666
Gorgon::Graphics::Color::Mahogany
constexpr RGBA Mahogany
Definition: Color.h:850
Gorgon::Graphics::Color::Pumpkin
constexpr RGBA Pumpkin
Definition: Color.h:799
Gorgon::Graphics::Color::Purple
constexpr RGBA Purple
Definition: Color.h:618
Gorgon::Graphics::ColorMode::RGB
@ RGB
24bit red, green, blue color mode that has red component in the lowest byte order
Gorgon::Graphics::Color::SkyBlue
constexpr RGBA SkyBlue
Definition: Color.h:630
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &first, const RGBA &second, float alpha=1.0f)
Blending constructor.
Definition: Color.h:116
Gorgon::Graphics::RGBA::RGBA
constexpr RGBA(uint32_t color)
Conversion from uint32_t.
Definition: Color.h:145
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &other, float newalpha)
Copy constructor with new alpha value.
Definition: Color.h:113
Gorgon::Graphics::RGBA::RGBA
RGBA(float lum)
Conversion from float. Assumes the given float value is a 0 to 1 luminance. Sets alpha to 255.
Definition: Color.h:150
Gorgon::Graphics::Color::DarkRose
constexpr RGBA DarkRose
Definition: Color.h:840
Gorgon::Graphics::Color::Chartreuse
constexpr RGBA Chartreuse
Definition: Color.h:692
Gorgon::Graphics::ColorMode::Invalid
@ Invalid
This is used to mark invalid color data.
Gorgon::Graphics::Color::OffWhite
constexpr RGBA OffWhite
Definition: Color.h:760
Gorgon::Graphics::Color::DarkGreen
constexpr RGBA DarkGreen
Definition: Color.h:635
Gorgon::Graphics::RGBA::BlendWith
RGBA BlendWith(const RGBA &color, float alpha) const
Blends the current color with the given color and returns the result.
Definition: Color.h:286
Gorgon::Graphics::Color::DarkLavender
constexpr RGBA DarkLavender
Definition: Color.h:773
Gorgon::Graphics::Color::OrangeRed
constexpr RGBA OrangeRed
Definition: Color.h:813
Gorgon::Graphics::Color::LightPurple
constexpr RGBA LightPurple
Definition: Color.h:633
Gorgon::Graphics::Color::White
constexpr RGBA White
Definition: Color.h:731
Gorgon::Graphics::Color::DarkRed
constexpr RGBA DarkRed
Definition: Color.h:674
Gorgon::Graphics::Color::Sky
constexpr RGBA Sky
Definition: Color.h:820
Gorgon::Graphics::Color::Marigold
constexpr RGBA Marigold
Definition: Color.h:876
Gorgon::Graphics::Color::Violet
constexpr RGBA Violet
Definition: Color.h:634
Gorgon::Graphics::Color::Pistachio
constexpr RGBA Pistachio
Definition: Color.h:880
Gorgon::Graphics::ColorMode::RGBA
@ RGBA
32bit red, green, blue and alpha channel image. Red component is in the lowest byte order and
Gorgon::Graphics::Color::DarkPurple
constexpr RGBA DarkPurple
Definition: Color.h:644
Gorgon::Graphics::Color::Teal
constexpr RGBA Teal
Definition: Color.h:625
Gorgon::Graphics::Color::PurplishPink
constexpr RGBA PurplishPink
Definition: Color.h:828
Gorgon::Graphics::Color::Pine
constexpr RGBA Pine
Definition: Color.h:885
Gorgon::Graphics::Color::Black
constexpr RGBA Black
Definition: Color.h:653
Gorgon::Graphics::Color::LemonYellow
constexpr RGBA LemonYellow
Definition: Color.h:881
Gorgon::Graphics::RGBAf::operator*
RGBAf operator*(const RGBAf &other) const
Definition: Color.h:468
Gorgon::Graphics::Color::Mud
constexpr RGBA Mud
Definition: Color.h:839
Gorgon::Graphics::Color::Blue
constexpr RGBA Blue
Definition: Color.h:620
Gorgon::Graphics::Color::BabyPink
constexpr RGBA BabyPink
Definition: Color.h:796
Gorgon::Graphics::Color::Amber
constexpr RGBA Amber
Definition: Color.h:887
Gorgon::Graphics::Color::JungleGreen
constexpr RGBA JungleGreen
Definition: Color.h:861
Gorgon::Graphics::RGBAf::Vector
float Vector[4]
Representation of this class as a float vector.
Definition: Color.h:601
Gorgon::Graphics::Color::DirtyGreen
constexpr RGBA DirtyGreen
Definition: Color.h:857
Gorgon::Graphics::Color::BluePurple
constexpr RGBA BluePurple
Definition: Color.h:757
Gorgon::Graphics::Color::PaleBrown
constexpr RGBA PaleBrown
Definition: Color.h:836
Gorgon::Graphics::Color::Khaki
constexpr RGBA Khaki
Definition: Color.h:685
Gorgon::Graphics::Color::PurpleBlue
constexpr RGBA PurpleBlue
Definition: Color.h:771
Gorgon::Graphics::ColorMode::Automatic
@ Automatic
This is used by some functions to mark color mode should be determined automatically.
Gorgon::Graphics::Color::Sage
constexpr RGBA Sage
Definition: Color.h:733
Gorgon::Graphics::Color::BabyBlue
constexpr RGBA BabyBlue
Definition: Color.h:677
Gorgon::Graphics::operator<<
std::ostream & operator<<(std::ostream &stream, const RGBA &color)
Prints the given color to the stream.
Definition: Color.h:319
Gorgon::Graphics::RGBAf
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
Gorgon::Graphics::RGBAf::Slide
void Slide(const RGBAf &color, float factor)
Blends the given color into this one with the given factor that is applied to color and alpha channel...
Definition: Color.h:555
Gorgon::Graphics::Color::Ocre
constexpr RGBA Ocre
Definition: Color.h:894
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(const RGBA &color, double alpha)
Converts a RGBA to RGBAf.
Definition: Color.h:400
Gorgon::Graphics::Color::BlueViolet
constexpr RGBA BlueViolet
Definition: Color.h:795
Gorgon::Graphics::Color::LightGreen
constexpr RGBA LightGreen
Definition: Color.h:627
Gorgon::Graphics::Color::ReddishPink
constexpr RGBA ReddishPink
Definition: Color.h:816
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(const RGBA &color)
Converts a RGBA to RGBAf.
Definition: Color.h:394
Gorgon::Graphics::Color::AppleGreen
constexpr RGBA AppleGreen
Definition: Color.h:764
Gorgon::Graphics::Color::Cyan
constexpr RGBA Cyan
Definition: Color.h:640
Gorgon::Graphics::Color::DarkGrey
constexpr RGBA DarkGrey
Definition: Color.h:704
Gorgon::Graphics::Color::Vermillion
constexpr RGBA Vermillion
Definition: Color.h:886
Gorgon::Graphics::Color::BrightPurple
constexpr RGBA BrightPurple
Definition: Color.h:675
Gorgon::Graphics::Color::DarkMagenta
constexpr RGBA DarkMagenta
Definition: Color.h:741
Gorgon::Graphics::RGBAf::operator!=
bool operator!=(const RGBAf &other) const
Compares two colors.
Definition: Color.h:503
Gorgon::Graphics::Color::LightOliveGreen
constexpr RGBA LightOliveGreen
Definition: Color.h:831
Gorgon::Graphics::Color::BurntOrange
constexpr RGBA BurntOrange
Definition: Color.h:669
Gorgon::Graphics::Color::RoyalPurple
constexpr RGBA RoyalPurple
Definition: Color.h:681
Gorgon::Graphics::Color::Magenta
constexpr RGBA Magenta
Definition: Color.h:628
Gorgon::Graphics::RGBA::A
Byte A
Alpha channel.
Definition: Color.h:312
Gorgon::Graphics::Color::SlateGrey
constexpr RGBA SlateGrey
Definition: Color.h:868
Gorgon::Graphics::Color::Charcoal
constexpr RGBA Charcoal
Definition: Color.h:797
Gorgon::Graphics::Color::FadedGreen
constexpr RGBA FadedGreen
Definition: Color.h:845
Gorgon::Graphics::Color::MidnightBlue
constexpr RGBA MidnightBlue
Definition: Color.h:744
Gorgon::Graphics::Color::GreyBlue
constexpr RGBA GreyBlue
Definition: Color.h:702
Gorgon::Graphics::Color::Burgundy
constexpr RGBA Burgundy
Definition: Color.h:684
Gorgon::Graphics::RGBA::RGBA
RGBA(int lum, int a)
Constructs a grayscale color from the given luminance.
Definition: Color.h:135
Gorgon::Graphics::Color::Names
const std::vector< std::pair< std::string, RGBA > > & Names()
Definition: Color.h:903
Gorgon::Graphics::Color::BlueGreen
constexpr RGBA BlueGreen
Definition: Color.h:686
Gorgon::Graphics::Color::BrownishRed
constexpr RGBA BrownishRed
Definition: Color.h:841
Gorgon::Graphics::Color::Eggshell
constexpr RGBA Eggshell
Definition: Color.h:860
Gorgon::Graphics::Color::Umber
constexpr RGBA Umber
Definition: Color.h:863
Gorgon::Graphics::Color::RosePink
constexpr RGBA RosePink
Definition: Color.h:808
Gorgon::Graphics::ColorMode::Grayscale
@ Grayscale
8bit gray scale color mode
Gorgon::Graphics::internal::isspace
bool isspace(Glyph g)
Definition: Font.cpp:96
Gorgon::Graphics::Color::Evergreen
constexpr RGBA Evergreen
Definition: Color.h:853
Gorgon::Graphics::Color::ArmyGreen
constexpr RGBA ArmyGreen
Definition: Color.h:703
Gorgon::Graphics::Color::PaleRed
constexpr RGBA PaleRed
Definition: Color.h:822
Gorgon::Graphics::Color::YellowGreen
constexpr RGBA YellowGreen
Definition: Color.h:676
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(unsigned color)
Converts from an unsigned int.
Definition: Color.h:404
Gorgon::Graphics::Color::DarkLime
constexpr RGBA DarkLime
Definition: Color.h:897
Gorgon::Graphics::Color::DarkBeige
constexpr RGBA DarkBeige
Definition: Color.h:824
Gorgon::Graphics::Color::Avocado
constexpr RGBA Avocado
Definition: Color.h:871
Gorgon::Graphics::Color::PineGreen
constexpr RGBA PineGreen
Definition: Color.h:798
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(double lum, float a=1.0f)
Constructor that sets all color channels to the given value to create a grayscale color....
Definition: Color.h:390
Gorgon::Graphics::RGBA::BlendWith
RGBA BlendWith(const RGBA &color) const
Blends the current color with the given color and returns the result.
Definition: Color.h:279
Gorgon::Graphics::Color::Sand
constexpr RGBA Sand
Definition: Color.h:697
Gorgon::Graphics::Color::ReddishPurple
constexpr RGBA ReddishPurple
Definition: Color.h:817
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(bool)=delete
Converts from an unsigned int.
Gorgon::Graphics::Color::Tangerine
constexpr RGBA Tangerine
Definition: Color.h:803
Gorgon::Graphics::Color::OceanBlue
constexpr RGBA OceanBlue
Definition: Color.h:739
Gorgon::Graphics::RGBAf::R
float R
Red channel.
Definition: Color.h:588
Gorgon::Graphics::RGBA::RGBA
RGBA()
Default constructor does not perform initialization.
Definition: Color.h:98
Gorgon::Graphics::Color::OliveDrab
constexpr RGBA OliveDrab
Definition: Color.h:769
Gorgon::Graphics::Color::LightAqua
constexpr RGBA LightAqua
Definition: Color.h:832
Gorgon::Graphics::RGBA::operator!=
bool operator!=(const RGBA &other) const
Compares two colors.
Definition: Color.h:219
Gorgon::Graphics::Color::Brick
constexpr RGBA Brick
Definition: Color.h:734
Gorgon::Graphics::Color::Aquamarine
constexpr RGBA Aquamarine
Definition: Color.h:670
Gorgon::Graphics::Color::Peach
constexpr RGBA Peach
Definition: Color.h:657
Gorgon::Graphics::Color::DarkTeal
constexpr RGBA DarkTeal
Definition: Color.h:683
Gorgon::Graphics::Color::Tan
constexpr RGBA Tan
Definition: Color.h:639
Gorgon::Graphics::Color::HunterGreen
constexpr RGBA HunterGreen
Definition: Color.h:719
Gorgon::Graphics::Color::CloudyBlue
constexpr RGBA CloudyBlue
Definition: Color.h:901
Gorgon::Graphics::Color::GreyGreen
constexpr RGBA GreyGreen
Definition: Color.h:732
Gorgon::Graphics::Color::SlateBlue
constexpr RGBA SlateBlue
Definition: Color.h:721
Gorgon::Graphics::Color::DarkCyan
constexpr RGBA DarkCyan
Definition: Color.h:770
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(float lum, float a=1.0f)
Constructor that sets all color channels to the given value to create a grayscale color....
Definition: Color.h:387
Gorgon::Graphics::Color::Yellow
constexpr RGBA Yellow
Definition: Color.h:629
Gorgon::Graphics::Color::RoyalBlue
constexpr RGBA RoyalBlue
Definition: Color.h:650
Gorgon::Graphics::Color::ReddishBrown
constexpr RGBA ReddishBrown
Definition: Color.h:736
Gorgon::Graphics::GetAlphaIndex
int GetAlphaIndex(ColorMode mode)
Returns the index of alpha channel. If alpha channel does not exists, this function returns -1.
Definition: Color.h:74
Gorgon::Graphics::Color::BrickRed
constexpr RGBA BrickRed
Definition: Color.h:682
Gorgon::Graphics::Color::BurntSienna
constexpr RGBA BurntSienna
Definition: Color.h:735
Gorgon::Graphics::Color::RedBrown
constexpr RGBA RedBrown
Definition: Color.h:801
Gorgon::Graphics::Color::Navy
constexpr RGBA Navy
Definition: Color.h:671
Gorgon::Graphics::Color::GreyishBlue
constexpr RGBA GreyishBlue
Definition: Color.h:750
Gorgon::Graphics::Color::Lilac
constexpr RGBA Lilac
Definition: Color.h:652
Gorgon::Graphics::Color::LightPink
constexpr RGBA LightPink
Definition: Color.h:665
Gorgon::Graphics::Color::Orchid
constexpr RGBA Orchid
Definition: Color.h:815
Gorgon::Graphics::Color::Plum
constexpr RGBA Plum
Definition: Color.h:680
Gorgon::Graphics::Color::SteelBlue
constexpr RGBA SteelBlue
Definition: Color.h:729
Gorgon::Graphics::RGBAf::RGBAf
RGBAf()
Default constructor does not perform initialization.
Definition: Color.h:380
Gorgon::Graphics::Color::SeaGreen
constexpr RGBA SeaGreen
Definition: Color.h:661
Gorgon::Graphics::Color::Cinnamon
constexpr RGBA Cinnamon
Definition: Color.h:900
Gorgon::Graphics::Color::DarkBrown
constexpr RGBA DarkBrown
Definition: Color.h:690
Gorgon::Graphics::RGBAf::G
float G
Green channel.
Definition: Color.h:591
Gorgon::Graphics::Color::Clay
constexpr RGBA Clay
Definition: Color.h:833
Gorgon::Graphics::Color::Taupe
constexpr RGBA Taupe
Definition: Color.h:689
Gorgon::Graphics::Color::ForrestGreen
constexpr RGBA ForrestGreen
Definition: Color.h:774
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &first, const RGBA &second, int alpha)
Blending constructor.
Definition: Color.h:126
Gorgon::Graphics::HasAlpha
bool HasAlpha(ColorMode mode)
Returns if the given color mode has alpha channel.
Definition: Color.h:69
Gorgon::Graphics::Blend
RGBA Blend(RGBA first, const RGBA &second)
Blends two colors together, you do not need to use namespace if calling on an RGBA object.
Definition: Color.h:358
Gorgon::Graphics::Color::DustyBlue
constexpr RGBA DustyBlue
Definition: Color.h:865
Gorgon::Graphics::Color::SeafoamGreen
constexpr RGBA SeafoamGreen
Definition: Color.h:687
Gorgon::Graphics::Color::Beige
constexpr RGBA Beige
Definition: Color.h:649
Gorgon::Graphics::Color::BloodRed
constexpr RGBA BloodRed
Definition: Color.h:784
Gorgon::Graphics::Color::CherryRed
constexpr RGBA CherryRed
Definition: Color.h:893
Gorgon::Graphics::Color::Pink
constexpr RGBA Pink
Definition: Color.h:621
Gorgon::Graphics::Color::Ocean
constexpr RGBA Ocean
Definition: Color.h:877
Gorgon::Graphics::Color::PinkyPurple
constexpr RGBA PinkyPurple
Definition: Color.h:843
Gorgon::Graphics::Color::Eggplant
constexpr RGBA Eggplant
Definition: Color.h:728
Gorgon::Graphics::Color::PastelBlue
constexpr RGBA PastelBlue
Definition: Color.h:780
Gorgon::Graphics::Color::Moss
constexpr RGBA Moss
Definition: Color.h:781
Gorgon::Graphics::Color::DarkOlive
constexpr RGBA DarkOlive
Definition: Color.h:790
Gorgon::Graphics::RGBA::Luminance
Byte Luminance() const
Returns the luminance of this color as a single byte number.
Definition: Color.h:227
Gorgon::Graphics::Color::Indigo
constexpr RGBA Indigo
Definition: Color.h:663
Gorgon::Graphics::Color::LimeGreen
constexpr RGBA LimeGreen
Definition: Color.h:632
Gorgon::Graphics::Color::Wine
constexpr RGBA Wine
Definition: Color.h:762
Gorgon::Graphics::Color::Puce
constexpr RGBA Puce
Definition: Color.h:700
Gorgon::Graphics::Color::BrightPink
constexpr RGBA BrightPink
Definition: Color.h:693
Gorgon::Graphics::Color::CamoGreen
constexpr RGBA CamoGreen
Definition: Color.h:844
Gorgon::Graphics::Color::GreyishGreen
constexpr RGBA GreyishGreen
Definition: Color.h:793
Gorgon::Graphics::Color::DullPink
constexpr RGBA DullPink
Definition: Color.h:852
Gorgon::Graphics::Color::LightTurquoise
constexpr RGBA LightTurquoise
Definition: Color.h:765
Gorgon::Graphics::Color::Grey
constexpr RGBA Grey
Definition: Color.h:631
Gorgon::Graphics::Color::ElectricGreen
constexpr RGBA ElectricGreen
Definition: Color.h:866
Gorgon::Graphics::RGBA::Blend
void Blend(const RGBA &color, float alpha)
Blends the given color into this one.
Definition: Color.h:254
Gorgon::Graphics::ColorMode::Alpha
@ Alpha
8bit alpha only color mode
Gorgon::Graphics::Color::Cream
constexpr RGBA Cream
Definition: Color.h:737
Gorgon::Graphics::RGBA::B
Byte B
Blue channel.
Definition: Color.h:309
Gorgon::Graphics::Color::MarineBlue
constexpr RGBA MarineBlue
Definition: Color.h:870
Gorgon::Graphics::Color::DarkViolet
constexpr RGBA DarkViolet
Definition: Color.h:772
Gorgon::Graphics::Color::LightMagenta
constexpr RGBA LightMagenta
Definition: Color.h:821
Gorgon::Graphics::Color::DeepRed
constexpr RGBA DeepRed
Definition: Color.h:812
Gorgon::Graphics::operator>>
std::istream & operator>>(std::istream &in, RGBA &color)
Reads a color from the stream.
Definition: Color.h:327
Gorgon::Graphics::Color::DarkTan
constexpr RGBA DarkTan
Definition: Color.h:777
Gorgon::Graphics::Color::Coffee
constexpr RGBA Coffee
Definition: Color.h:889
Gorgon::Graphics::Color::Sienna
constexpr RGBA Sienna
Definition: Color.h:789
Gorgon::Graphics::RGBAf::Blend
void Blend(const RGBAf &color)
Blends the given color into this one.
Definition: Color.h:509
Gorgon::Graphics::Color::Ivory
constexpr RGBA Ivory
Definition: Color.h:895
Gorgon::Graphics::Color::Grass
constexpr RGBA Grass
Definition: Color.h:782
Gorgon::Graphics::Color::NeonPink
constexpr RGBA NeonPink
Definition: Color.h:809
Gorgon::Graphics::Color::BrightBlue
constexpr RGBA BrightBlue
Definition: Color.h:667
Gorgon::Graphics::Color::PaleOrange
constexpr RGBA PaleOrange
Definition: Color.h:775
Gorgon::Graphics::Color::Fuchsia
constexpr RGBA Fuchsia
Definition: Color.h:718
Gorgon::Graphics::Color::MuddyGreen
constexpr RGBA MuddyGreen
Definition: Color.h:875
Gorgon::Graphics::Color::Cobalt
constexpr RGBA Cobalt
Definition: Color.h:767
Gorgon::Graphics::Color::BrightGreen
constexpr RGBA BrightGreen
Definition: Color.h:645
Gorgon::Graphics::Color::Grape
constexpr RGBA Grape
Definition: Color.h:751
Gorgon::Graphics::Color::Slate
constexpr RGBA Slate
Definition: Color.h:707
Gorgon::Graphics::Color::MustardYellow
constexpr RGBA MustardYellow
Definition: Color.h:714
Gorgon::Graphics::Color::LighterGreen
constexpr RGBA LighterGreen
Definition: Color.h:867
Gorgon::Graphics::RGBAf::B
float B
Blue channel.
Definition: Color.h:594
Gorgon::Graphics::Color::Goldenrod
constexpr RGBA Goldenrod
Definition: Color.h:706
Gorgon::Graphics::RGBA::G
Byte G
Green channel.
Definition: Color.h:306
Gorgon::Graphics::RGBAf::Slide
void Slide(const RGBAf &color, float factor_color, float factor_alpha)
Blends the given color into this one with the given factor that is applied to color and alpha channel...
Definition: Color.h:566
Gorgon::Graphics::Color::DullBlue
constexpr RGBA DullBlue
Definition: Color.h:835
Gorgon::Graphics::Color::DeepPink
constexpr RGBA DeepPink
Definition: Color.h:783
Gorgon::Graphics::Color::BluishGreen
constexpr RGBA BluishGreen
Definition: Color.h:779
Gorgon::Graphics::Color::MintGreen
constexpr RGBA MintGreen
Definition: Color.h:679
Gorgon::Byte
unsigned char Byte
Represents smallest cell in memory.
Definition: Types.h:9
Gorgon::Graphics::Color::DarkBlue
constexpr RGBA DarkBlue
Definition: Color.h:638
Gorgon::Graphics::GetChannelsPerPixel
unsigned long GetChannelsPerPixel(ColorMode mode)
Returns bytes per pixel for the given color mode.
Definition: Color.h:47
Gorgon::Graphics::Color::DarkTurquoise
constexpr RGBA DarkTurquoise
Definition: Color.h:758
Gorgon::Graphics::Color::PinkishRed
constexpr RGBA PinkishRed
Definition: Color.h:754
Gorgon::Graphics::Color::Sepia
constexpr RGBA Sepia
Definition: Color.h:890
Gorgon::Graphics::Color::Jade
constexpr RGBA Jade
Definition: Color.h:825
Gorgon::Graphics::RGBA::operator==
bool operator==(const RGBA &other) const
Compares two colors.
Definition: Color.h:214
Gorgon::UI::Graphics
@ Graphics
Definition: Template.h:164
Gorgon::Graphics::Color::DullGreen
constexpr RGBA DullGreen
Definition: Color.h:763
Gorgon::Graphics::Color::DarkNavy
constexpr RGBA DarkNavy
Definition: Color.h:899
Gorgon::Graphics::Color::BrownishGreen
constexpr RGBA BrownishGreen
Definition: Color.h:802
Gorgon::Graphics::Color::BluishPurple
constexpr RGBA BluishPurple
Definition: Color.h:743
Gorgon::Graphics::Color::Periwinkle
constexpr RGBA Periwinkle
Definition: Color.h:660
Gorgon::Graphics::Color::YellowishGreen
constexpr RGBA YellowishGreen
Definition: Color.h:748
Gorgon::Graphics::RGBA::RGBA
RGBA(Byte r, Byte g, Byte b, Byte a=255)
Filling constructor.
Definition: Color.h:129
Gorgon::Graphics::Color::DarkOrange
constexpr RGBA DarkOrange
Definition: Color.h:698
Gorgon::Graphics::RGBA::HTMLColor
std::string HTMLColor() const
Returns a six nibble HTML color.
Definition: Color.h:238
Gorgon::Graphics::Color::LightMauve
constexpr RGBA LightMauve
Definition: Color.h:878
Gorgon::Graphics::Color::SeaBlue
constexpr RGBA SeaBlue
Definition: Color.h:723
Gorgon::Graphics::RGBAf::Slide
void Slide(const RGBAf &color, const RGBAf &factor)
Blends the given color into this one with the given factor that is applied to color and alpha channel...
Definition: Color.h:578
Gorgon::Graphics::RGBAf::operator*=
RGBAf & operator*=(const RGBAf &other)
Definition: Color.h:472
Gorgon::Graphics::Color::AquaGreen
constexpr RGBA AquaGreen
Definition: Color.h:805
Gorgon::Graphics::Color::Maroon
constexpr RGBA Maroon
Definition: Color.h:646
Gorgon::Graphics::Color::DarkPink
constexpr RGBA DarkPink
Definition: Color.h:659
Gorgon::Graphics::RGBAf::Convert
RGBA Convert() const
Converts this color to RGBA by clipping the values.
Definition: Color.h:482
Gorgon::Graphics::Color::Bordeaux
constexpr RGBA Bordeaux
Definition: Color.h:879
Gorgon::Graphics::Color::Aqua
constexpr RGBA Aqua
Definition: Color.h:641
Gorgon::Graphics::Color::EmeraldGreen
constexpr RGBA EmeraldGreen
Definition: Color.h:837
Gorgon::Graphics::Color::MossGreen
constexpr RGBA MossGreen
Definition: Color.h:730
Gorgon::Graphics::Color::IceBlue
constexpr RGBA IceBlue
Definition: Color.h:855
Gorgon::Graphics::Color::BrightRed
constexpr RGBA BrightRed
Definition: Color.h:755
Gorgon::Graphics::Color::Lavender
constexpr RGBA Lavender
Definition: Color.h:637
Gorgon::Graphics::Color::GreenishBlue
constexpr RGBA GreenishBlue
Definition: Color.h:776
Gorgon::Graphics::Color::LightGrey
constexpr RGBA LightGrey
Definition: Color.h:725
Gorgon::Graphics::Color::AquaBlue
constexpr RGBA AquaBlue
Definition: Color.h:786
Gorgon::Graphics::Color::PaleGreen
constexpr RGBA PaleGreen
Definition: Color.h:656
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(int)=delete
Converts from an unsigned int.
Gorgon::Graphics::Color::Orange
constexpr RGBA Orange
Definition: Color.h:626
Gorgon::Graphics::Color::LightOlive
constexpr RGBA LightOlive
Definition: Color.h:752
Gorgon::Graphics::Color::LightBlue
constexpr RGBA LightBlue
Definition: Color.h:624
Gorgon::Graphics::RGBA::R
Byte R
Red channel.
Definition: Color.h:303
Gorgon::Graphics::Color::PeaSoup
constexpr RGBA PeaSoup
Definition: Color.h:873
Gorgon::Graphics::Color::DeepGreen
constexpr RGBA DeepGreen
Definition: Color.h:848
Gorgon::Graphics::Color::RedOrange
constexpr RGBA RedOrange
Definition: Color.h:742
Gorgon::Graphics::Color::Ochre
constexpr RGBA Ochre
Definition: Color.h:715
Gorgon::Graphics::Color::Gold
constexpr RGBA Gold
Definition: Color.h:678
Gorgon::Graphics::Color::NeonGreen
constexpr RGBA NeonGreen
Definition: Color.h:668
Gorgon::Graphics::Color::YellowOrange
constexpr RGBA YellowOrange
Definition: Color.h:818
Gorgon::Graphics::Color::Green
constexpr RGBA Green
Definition: Color.h:619
Gorgon::Graphics::Color::Emerald
constexpr RGBA Emerald
Definition: Color.h:823
Gorgon::Graphics::Color::PowderBlue
constexpr RGBA PowderBlue
Definition: Color.h:761
Gorgon::Graphics::RGBAf::Blend
void Blend(const RGBAf &color, float factor)
Blends the given color into this one with the given factor that is applied to all channels.
Definition: Color.h:531
Gorgon::Graphics::Color::PastelPurple
constexpr RGBA PastelPurple
Definition: Color.h:788
Gorgon::Graphics::Color::BrownishOrange
constexpr RGBA BrownishOrange
Definition: Color.h:830
Gorgon::Graphics::Color::CanaryYellow
constexpr RGBA CanaryYellow
Definition: Color.h:892
Gorgon::Graphics::Color::Chocolate
constexpr RGBA Chocolate
Definition: Color.h:794
Gorgon::Graphics::Color::PalePurple
constexpr RGBA PalePurple
Definition: Color.h:722
Gorgon::Graphics::Color::ReddishOrange
constexpr RGBA ReddishOrange
Definition: Color.h:849
Gorgon::Graphics::RGBAf::operator=
RGBAf & operator=(const RGBAf &)=default
Copy assignment.
Gorgon::Graphics::Color::DarkSalmon
constexpr RGBA DarkSalmon
Definition: Color.h:827
Gorgon::Graphics::Color::Olive
constexpr RGBA Olive
Definition: Color.h:647
Gorgon::Graphics::Color::OrangeBrown
constexpr RGBA OrangeBrown
Definition: Color.h:811
Gorgon::Graphics::Color::DeepBlue
constexpr RGBA DeepBlue
Definition: Color.h:710
Gorgon::Graphics::RGBAf::A
float A
Alpha channel.
Definition: Color.h:597
Gorgon::Graphics::Color::PalePink
constexpr RGBA PalePink
Definition: Color.h:711
Gorgon::Graphics::Color::DarkPeach
constexpr RGBA DarkPeach
Definition: Color.h:862
Gorgon::Graphics::Color::NeonPurple
constexpr RGBA NeonPurple
Definition: Color.h:766
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(float r, float g, float b, float a=1.f)
Filling constructor.
Definition: Color.h:383
Gorgon::Graphics::Color::LightViolet
constexpr RGBA LightViolet
Definition: Color.h:745
Gorgon::Graphics::Color::DeepPurple
constexpr RGBA DeepPurple
Definition: Color.h:691
Gorgon::Graphics::Color::Raspberry
constexpr RGBA Raspberry
Definition: Color.h:806
Gorgon::Graphics::Color::DuskyPink
constexpr RGBA DuskyPink
Definition: Color.h:883
Gorgon::Graphics::Color::GrassGreen
constexpr RGBA GrassGreen
Definition: Color.h:672
Gorgon::Graphics::Color::PaleBlue
constexpr RGBA PaleBlue
Definition: Color.h:673
Gorgon::Graphics::Color::BrightYellow
constexpr RGBA BrightYellow
Definition: Color.h:864
Gorgon::Graphics::Color::LightBrown
constexpr RGBA LightBrown
Definition: Color.h:655
Gorgon::Graphics::Color::LightCyan
constexpr RGBA LightCyan
Definition: Color.h:819
Gorgon::Graphics::Color::Lemon
constexpr RGBA Lemon
Definition: Color.h:874
Gorgon::Graphics::Color::PastelGreen
constexpr RGBA PastelGreen
Definition: Color.h:696
Gorgon::Graphics::Color::ForestGreen
constexpr RGBA ForestGreen
Definition: Color.h:642
Gorgon::Graphics::Color::DarkYellow
constexpr RGBA DarkYellow
Definition: Color.h:705
Gorgon::Graphics::Color::OliveGreen
constexpr RGBA OliveGreen
Definition: Color.h:658
Gorgon::Graphics::RGBA::RGBA
RGBA(Byte lum, Byte a=255)
Constructs a grayscale color from the given luminance.
Definition: Color.h:132
Gorgon::Graphics::Color::GreenYellow
constexpr RGBA GreenYellow
Definition: Color.h:791
Gorgon::Graphics::Color::DarkAqua
constexpr RGBA DarkAqua
Definition: Color.h:829
Gorgon::Graphics::RGBAf::Luminance
float Luminance() const
Returns the luminance of this color as a floating point value between 0 and 1.
Definition: Color.h:493
Gorgon::Graphics::Color::Mint
constexpr RGBA Mint
Definition: Color.h:695
Gorgon::Graphics::Color::Cerulean
constexpr RGBA Cerulean
Definition: Color.h:712
Gorgon::Graphics::Color::Brown
constexpr RGBA Brown
Definition: Color.h:622
Gorgon::Graphics::Color::CobaltBlue
constexpr RGBA CobaltBlue
Definition: Color.h:810
Gorgon::Graphics::Color::Red
constexpr RGBA Red
Definition: Color.h:623
Gorgon::Graphics::Color::NavyBlue
constexpr RGBA NavyBlue
Definition: Color.h:651
Gorgon::Graphics::Color::PaleYellow
constexpr RGBA PaleYellow
Definition: Color.h:716
Gorgon::Graphics::Color::DarkSkyBlue
constexpr RGBA DarkSkyBlue
Definition: Color.h:854
Gorgon::Graphics::Color::Coral
constexpr RGBA Coral
Definition: Color.h:738
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &)=default
Copy constructor.
Gorgon::Graphics::Color::LightYellow
constexpr RGBA LightYellow
Definition: Color.h:727
Gorgon::Graphics::Color::BurntUmber
constexpr RGBA BurntUmber
Definition: Color.h:834
Gorgon::Graphics::Color::LightOrange
constexpr RGBA LightOrange
Definition: Color.h:694
Gorgon::Graphics::Color::Scarlet
constexpr RGBA Scarlet
Definition: Color.h:792
Gorgon::Graphics::RGBA::AccurateLuminance
float AccurateLuminance() const
Returns the luminance of this color as a floating point value between 0 and 1.
Definition: Color.h:233
Gorgon::Graphics::Color::DirtyYellow
constexpr RGBA DirtyYellow
Definition: Color.h:814
Gorgon::Graphics::Color::Mustard
constexpr RGBA Mustard
Definition: Color.h:664
Gorgon::Graphics::RGBA::operator=
RGBA & operator=(const RGBA &)=default
Copy assignment.
Gorgon::Graphics::Color::GreenishBrown
constexpr RGBA GreenishBrown
Definition: Color.h:800
Gorgon::Graphics::Color::GreenBlue
constexpr RGBA GreenBlue
Definition: Color.h:778
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &first, const RGBA &second, double alpha)
Blending constructor.
Definition: Color.h:121
Gorgon::Graphics::RGBA::RGBA
RGBA(const RGBA &other, double newalpha)
Copy constructor with new alpha value.
Definition: Color.h:110
Gorgon::Graphics::RGBAf::RGBAf
RGBAf(const RGBA &color, float alpha)
Converts a RGBA to RGBAf.
Definition: Color.h:397
Gorgon::Graphics::Color::Denim
constexpr RGBA Denim
Definition: Color.h:859
Gorgon::Graphics::Color::Forest
constexpr RGBA Forest
Definition: Color.h:872
Gorgon::Graphics::Color::HotPink
constexpr RGBA HotPink
Definition: Color.h:654