5#ifndef FLUTTER_IMPELLER_GEOMETRY_COLOR_H_
6#define FLUTTER_IMPELLER_GEOMETRY_COLOR_H_
19#define IMPELLER_FOR_EACH_BLEND_MODE(V) \
154 static_cast<Scalar>(r) / 255.0f,
static_cast<Scalar>(g) / 255.0f,
155 static_cast<Scalar>(b) / 255.0f,
static_cast<Scalar>(a) / 255.0f);
160 return (((std::lround(color.
alpha * 255.0f) & 0xff) << 24) |
161 ((std::lround(color.
red * 255.0f) & 0xff) << 16) |
162 ((std::lround(color.
green * 255.0f) & 0xff) << 8) |
163 ((std::lround(color.
blue * 255.0f) & 0xff) << 0)) &
176 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
186 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
196 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
206 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
233 return a + (b - a) * t;
237 return Color(std::clamp(
red, 0.0f, 1.0f), std::clamp(
green, 0.0f, 1.0f),
238 std::clamp(
blue, 0.0f, 1.0f), std::clamp(
alpha, 0.0f, 1.0f));
247 uint8_t r = std::round(
red * 255.0f);
248 uint8_t g = std::round(
green * 255.0f);
249 uint8_t b = std::round(
blue * 255.0f);
250 uint8_t a = std::round(
alpha * 255.0f);
261 return result[3] << 24 | result[0] << 16 | result[1] << 8 | result[2];
264 template <
typename H>
266 return H::combine(std::move(h),
c.ToARGB());
269 static constexpr Color White() {
return {1.0f, 1.0f, 1.0f, 1.0f}; }
271 static constexpr Color Black() {
return {0.0f, 0.0f, 0.0f, 1.0f}; }
277 static constexpr Color Red() {
return {1.0f, 0.0f, 0.0f, 1.0f}; }
279 static constexpr Color Green() {
return {0.0f, 1.0f, 0.0f, 1.0f}; }
281 static constexpr Color Blue() {
return {0.0f, 0.0f, 1.0f, 1.0f}; }
288 return {240.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
292 return {250.0f / 255.0f, 235.0f / 255.0f, 215.0f / 255.0f, 1.0f};
296 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
300 return {127.0f / 255.0f, 255.0f / 255.0f, 212.0f / 255.0f, 1.0f};
304 return {240.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
308 return {245.0f / 255.0f, 245.0f / 255.0f, 220.0f / 255.0f, 1.0f};
312 return {255.0f / 255.0f, 228.0f / 255.0f, 196.0f / 255.0f, 1.0f};
316 return {255.0f / 255.0f, 235.0f / 255.0f, 205.0f / 255.0f, 1.0f};
320 return {138.0f / 255.0f, 43.0f / 255.0f, 226.0f / 255.0f, 1.0f};
324 return {165.0f / 255.0f, 42.0f / 255.0f, 42.0f / 255.0f, 1.0f};
328 return {222.0f / 255.0f, 184.0f / 255.0f, 135.0f / 255.0f, 1.0f};
332 return {95.0f / 255.0f, 158.0f / 255.0f, 160.0f / 255.0f, 1.0f};
336 return {127.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
340 return {210.0f / 255.0f, 105.0f / 255.0f, 30.0f / 255.0f, 1.0f};
344 return {255.0f / 255.0f, 127.0f / 255.0f, 80.0f / 255.0f, 1.0f};
348 return {100.0f / 255.0f, 149.0f / 255.0f, 237.0f / 255.0f, 1.0f};
352 return {255.0f / 255.0f, 248.0f / 255.0f, 220.0f / 255.0f, 1.0f};
356 return {220.0f / 255.0f, 20.0f / 255.0f, 60.0f / 255.0f, 1.0f};
360 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
364 return {0.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
368 return {0.0f / 255.0f, 139.0f / 255.0f, 139.0f / 255.0f, 1.0f};
372 return {184.0f / 255.0f, 134.0f / 255.0f, 11.0f / 255.0f, 1.0f};
376 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
380 return {0.0f / 255.0f, 100.0f / 255.0f, 0.0f / 255.0f, 1.0f};
384 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
388 return {189.0f / 255.0f, 183.0f / 255.0f, 107.0f / 255.0f, 1.0f};
392 return {139.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
396 return {85.0f / 255.0f, 107.0f / 255.0f, 47.0f / 255.0f, 1.0f};
400 return {255.0f / 255.0f, 140.0f / 255.0f, 0.0f / 255.0f, 1.0f};
404 return {153.0f / 255.0f, 50.0f / 255.0f, 204.0f / 255.0f, 1.0f};
408 return {139.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
412 return {233.0f / 255.0f, 150.0f / 255.0f, 122.0f / 255.0f, 1.0f};
416 return {143.0f / 255.0f, 188.0f / 255.0f, 143.0f / 255.0f, 1.0f};
420 return {72.0f / 255.0f, 61.0f / 255.0f, 139.0f / 255.0f, 1.0f};
424 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
428 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
432 return {0.0f / 255.0f, 206.0f / 255.0f, 209.0f / 255.0f, 1.0f};
436 return {148.0f / 255.0f, 0.0f / 255.0f, 211.0f / 255.0f, 1.0f};
440 return {255.0f / 255.0f, 20.0f / 255.0f, 147.0f / 255.0f, 1.0f};
444 return {0.0f / 255.0f, 191.0f / 255.0f, 255.0f / 255.0f, 1.0f};
448 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
452 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
456 return {30.0f / 255.0f, 144.0f / 255.0f, 255.0f / 255.0f, 1.0f};
460 return {178.0f / 255.0f, 34.0f / 255.0f, 34.0f / 255.0f, 1.0f};
464 return {255.0f / 255.0f, 250.0f / 255.0f, 240.0f / 255.0f, 1.0f};
468 return {34.0f / 255.0f, 139.0f / 255.0f, 34.0f / 255.0f, 1.0f};
472 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
476 return {220.0f / 255.0f, 220.0f / 255.0f, 220.0f / 255.0f, 1.0f};
480 return {248.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
484 return {255.0f / 255.0f, 215.0f / 255.0f, 0.0f / 255.0f, 1.0f};
488 return {218.0f / 255.0f, 165.0f / 255.0f, 32.0f / 255.0f, 1.0f};
492 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
496 return {173.0f / 255.0f, 255.0f / 255.0f, 47.0f / 255.0f, 1.0f};
500 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
504 return {240.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
508 return {255.0f / 255.0f, 105.0f / 255.0f, 180.0f / 255.0f, 1.0f};
512 return {205.0f / 255.0f, 92.0f / 255.0f, 92.0f / 255.0f, 1.0f};
516 return {75.0f / 255.0f, 0.0f / 255.0f, 130.0f / 255.0f, 1.0f};
520 return {255.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
524 return {240.0f / 255.0f, 230.0f / 255.0f, 140.0f / 255.0f, 1.0f};
528 return {230.0f / 255.0f, 230.0f / 255.0f, 250.0f / 255.0f, 1.0f};
532 return {255.0f / 255.0f, 240.0f / 255.0f, 245.0f / 255.0f, 1.0f};
536 return {124.0f / 255.0f, 252.0f / 255.0f, 0.0f / 255.0f, 1.0f};
540 return {255.0f / 255.0f, 250.0f / 255.0f, 205.0f / 255.0f, 1.0f};
544 return {173.0f / 255.0f, 216.0f / 255.0f, 230.0f / 255.0f, 1.0f};
548 return {240.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
552 return {224.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
556 return {50.0f / 255.0f, 250.0f / 255.0f, 210.0f / 255.0f, 1.0f};
560 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
564 return {144.0f / 255.0f, 238.0f / 255.0f, 144.0f / 255.0f, 1.0f};
568 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
572 return {255.0f / 255.0f, 182.0f / 255.0f, 193.0f / 255.0f, 1.0f};
576 return {255.0f / 255.0f, 160.0f / 255.0f, 122.0f / 255.0f, 1.0f};
580 return {32.0f / 255.0f, 178.0f / 255.0f, 170.0f / 255.0f, 1.0f};
584 return {135.0f / 255.0f, 206.0f / 255.0f, 250.0f / 255.0f, 1.0f};
588 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
592 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
596 return {176.0f / 255.0f, 196.0f / 255.0f, 222.0f / 255.0f, 1.0f};
600 return {255.0f / 255.0f, 255.0f / 255.0f, 224.0f / 255.0f, 1.0f};
604 return {0.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
608 return {50.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
612 return {250.0f / 255.0f, 240.0f / 255.0f, 230.0f / 255.0f, 1.0f};
616 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
620 return {128.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
624 return {102.0f / 255.0f, 205.0f / 255.0f, 170.0f / 255.0f, 1.0f};
628 return {0.0f / 255.0f, 0.0f / 255.0f, 205.0f / 255.0f, 1.0f};
632 return {186.0f / 255.0f, 85.0f / 255.0f, 211.0f / 255.0f, 1.0f};
636 return {147.0f / 255.0f, 112.0f / 255.0f, 219.0f / 255.0f, 1.0f};
640 return {60.0f / 255.0f, 179.0f / 255.0f, 113.0f / 255.0f, 1.0f};
644 return {123.0f / 255.0f, 104.0f / 255.0f, 238.0f / 255.0f, 1.0f};
648 return {0.0f / 255.0f, 250.0f / 255.0f, 154.0f / 255.0f, 1.0f};
652 return {72.0f / 255.0f, 209.0f / 255.0f, 204.0f / 255.0f, 1.0f};
656 return {199.0f / 255.0f, 21.0f / 255.0f, 133.0f / 255.0f, 1.0f};
660 return {25.0f / 255.0f, 25.0f / 255.0f, 112.0f / 255.0f, 1.0f};
664 return {245.0f / 255.0f, 255.0f / 255.0f, 250.0f / 255.0f, 1.0f};
668 return {255.0f / 255.0f, 228.0f / 255.0f, 225.0f / 255.0f, 1.0f};
672 return {255.0f / 255.0f, 228.0f / 255.0f, 181.0f / 255.0f, 1.0f};
676 return {255.0f / 255.0f, 222.0f / 255.0f, 173.0f / 255.0f, 1.0f};
680 return {0.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
684 return {253.0f / 255.0f, 245.0f / 255.0f, 230.0f / 255.0f, 1.0f};
688 return {128.0f / 255.0f, 128.0f / 255.0f, 0.0f / 255.0f, 1.0f};
692 return {107.0f / 255.0f, 142.0f / 255.0f, 35.0f / 255.0f, 1.0f};
696 return {255.0f / 255.0f, 165.0f / 255.0f, 0.0f / 255.0f, 1.0f};
700 return {255.0f / 255.0f, 69.0f / 255.0f, 0.0f / 255.0f, 1.0f};
704 return {218.0f / 255.0f, 112.0f / 255.0f, 214.0f / 255.0f, 1.0f};
708 return {238.0f / 255.0f, 232.0f / 255.0f, 170.0f / 255.0f, 1.0f};
712 return {152.0f / 255.0f, 251.0f / 255.0f, 152.0f / 255.0f, 1.0f};
716 return {175.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f, 1.0f};
720 return {219.0f / 255.0f, 112.0f / 255.0f, 147.0f / 255.0f, 1.0f};
724 return {255.0f / 255.0f, 239.0f / 255.0f, 213.0f / 255.0f, 1.0f};
728 return {255.0f / 255.0f, 218.0f / 255.0f, 185.0f / 255.0f, 1.0f};
732 return {205.0f / 255.0f, 133.0f / 255.0f, 63.0f / 255.0f, 1.0f};
736 return {255.0f / 255.0f, 192.0f / 255.0f, 203.0f / 255.0f, 1.0f};
740 return {221.0f / 255.0f, 160.0f / 255.0f, 221.0f / 255.0f, 1.0f};
744 return {176.0f / 255.0f, 224.0f / 255.0f, 230.0f / 255.0f, 1.0f};
748 return {128.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
752 return {188.0f / 255.0f, 143.0f / 255.0f, 143.0f / 255.0f, 1.0f};
756 return {65.0f / 255.0f, 105.0f / 255.0f, 225.0f / 255.0f, 1.0f};
760 return {139.0f / 255.0f, 69.0f / 255.0f, 19.0f / 255.0f, 1.0f};
764 return {250.0f / 255.0f, 128.0f / 255.0f, 114.0f / 255.0f, 1.0f};
768 return {244.0f / 255.0f, 164.0f / 255.0f, 96.0f / 255.0f, 1.0f};
772 return {46.0f / 255.0f, 139.0f / 255.0f, 87.0f / 255.0f, 1.0f};
776 return {255.0f / 255.0f, 245.0f / 255.0f, 238.0f / 255.0f, 1.0f};
780 return {160.0f / 255.0f, 82.0f / 255.0f, 45.0f / 255.0f, 1.0f};
784 return {192.0f / 255.0f, 192.0f / 255.0f, 192.0f / 255.0f, 1.0f};
788 return {135.0f / 255.0f, 206.0f / 255.0f, 235.0f / 255.0f, 1.0f};
792 return {106.0f / 255.0f, 90.0f / 255.0f, 205.0f / 255.0f, 1.0f};
796 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
800 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
804 return {255.0f / 255.0f, 250.0f / 255.0f, 250.0f / 255.0f, 1.0f};
808 return {0.0f / 255.0f, 255.0f / 255.0f, 127.0f / 255.0f, 1.0f};
812 return {70.0f / 255.0f, 130.0f / 255.0f, 180.0f / 255.0f, 1.0f};
816 return {210.0f / 255.0f, 180.0f / 255.0f, 140.0f / 255.0f, 1.0f};
820 return {0.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
824 return {216.0f / 255.0f, 191.0f / 255.0f, 216.0f / 255.0f, 1.0f};
828 return {255.0f / 255.0f, 99.0f / 255.0f, 71.0f / 255.0f, 1.0f};
832 return {64.0f / 255.0f, 224.0f / 255.0f, 208.0f / 255.0f, 1.0f};
836 return {238.0f / 255.0f, 130.0f / 255.0f, 238.0f / 255.0f, 1.0f};
840 return {245.0f / 255.0f, 222.0f / 255.0f, 179.0f / 255.0f, 1.0f};
844 return {245.0f / 255.0f, 245.0f / 255.0f, 245.0f / 255.0f, 1.0f};
848 return {255.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
852 return {154.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
859 static_cast<Scalar>((std::rand() % 255) / 255.0f),
860 static_cast<Scalar>((std::rand() % 255) / 255.0f),
861 static_cast<Scalar>((std::rand() % 255) / 255.0f),
902template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
907template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
910 return {v -
c.red, v -
c.green, v -
c.blue, v -
c.alpha};
913template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
918template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
921 return {v /
c.red, v /
c.green, v /
c.blue, v /
c.alpha};
924static_assert(
sizeof(Color) == 4 *
sizeof(
Scalar));
931 out <<
"(" <<
c.red <<
", " <<
c.green <<
", " <<
c.blue <<
", " <<
c.alpha
938 out <<
"BlendMode::k" << BlendModeToString(mode);
constexpr Color operator-(T value, const Color &c)
constexpr Color operator/(T value, const Color &c)
constexpr Color operator+(T value, const Color &c)
const char * BlendModeToString(BlendMode blend_mode)
constexpr Color operator*(T value, const Color &c)
constexpr bool ScalarNearlyEqual(Scalar x, Scalar y, Scalar tolerance=kEhCloseEnough)
std::ostream & operator<<(std::ostream &out, const impeller::Arc &a)
static constexpr Color MidnightBlue()
static constexpr Color Crimson()
static constexpr Color SaddleBrown()
static constexpr Color Gray()
static constexpr Color PapayaWhip()
static constexpr Color DarkCyan()
static constexpr Color Olive()
static constexpr Color DarkTurquoise()
static constexpr Color SlateGray()
static constexpr Color Moccasin()
static constexpr Color MediumSeagreen()
static constexpr Color MediumBlue()
static constexpr Color LemonChiffon()
static constexpr Color Cyan()
constexpr Color operator*(T value) const
static constexpr Color Bisque()
static constexpr Color LightGrey()
static uint32_t ToIColor(Color color)
Convert this color to a 32-bit representation.
static constexpr Color DarkOrchid()
static constexpr Color Lime()
static constexpr Color DarkSalmon()
static constexpr Color Grey()
uint32_t ToARGB() const
Convert to ARGB 32 bit color.
constexpr bool IsOpaque() const
static constexpr Color LightBlue()
static constexpr Color LimeGreen()
static constexpr Color SandyBrown()
static constexpr Color LightSalmon()
static constexpr Color DarkOliveGreen()
static constexpr Color PaleVioletRed()
static constexpr Color Azure()
static constexpr Color BlackTransparent()
static constexpr Color GreenYellow()
static constexpr Color Thistle()
static constexpr Color LightPink()
static constexpr Color MistyRose()
static constexpr Color MediumOrchid()
constexpr Color operator*(const Color &c) const
static constexpr Color DarkGoldenrod()
static constexpr Color Indigo()
static constexpr Color Khaki()
static constexpr Color OldLace()
static constexpr Color DarkKhaki()
static constexpr Color Honeydew()
static constexpr Color RoyalBlue()
static constexpr Color MintCream()
constexpr Color operator/(T value) const
static constexpr Color Chartreuse()
static constexpr Color Orchid()
constexpr Color operator/(const Color &c) const
static constexpr Color BlueViolet()
static constexpr Color BurlyWood()
static constexpr Color Turquoise()
static constexpr Color Fuchsia()
static constexpr Color Snow()
static constexpr Color LightSteelBlue()
constexpr bool operator==(const Color &c) const
static constexpr Color Seashell()
Color LinearToSRGB() const
Convert the color from linear space to sRGB space.
static constexpr Color LightGray()
static constexpr Color DeepPink()
static constexpr Color Black()
static constexpr Color IndianRed()
static constexpr Color Ivory()
static constexpr Color DarkBlue()
static constexpr Color CornflowerBlue()
static constexpr Color LightSkyBlue()
constexpr Color operator+(T value) const
static constexpr Color Violet()
static constexpr Color Sienna()
static constexpr Color Chocolate()
static constexpr Color MediumTurquoise()
static constexpr Color White()
static constexpr Color Gold()
static constexpr Color Navy()
constexpr bool IsTransparent() const
static constexpr Color SlateBlue()
static constexpr Color Beige()
static constexpr Color LawnGreen()
static constexpr Color Magenta()
static constexpr Color PaleGreen()
static constexpr Color CadetBlue()
static constexpr Color DodgerBlue()
static constexpr Color LightCoral()
constexpr Color WithAlpha(Scalar new_alpha) const
static constexpr Color LavenderBlush()
static constexpr Color DarkGrey()
static constexpr Color PowderBlue()
Color ApplyColorMatrix(const ColorMatrix &color_matrix) const
A color filter that transforms colors through a 4x5 color matrix.
static constexpr Color WhiteTransparent()
static constexpr Color HotPink()
constexpr Color(Scalar r, Scalar g, Scalar b, Scalar a)
static constexpr Color SkyBlue()
static constexpr Color SpringGreen()
static constexpr Color BlanchedAlmond()
static constexpr Color LightSlateGray()
constexpr Color operator+(const Color &c) const
static constexpr Color DimGrey()
static constexpr Color Maroon()
static constexpr Color Ghostwhite()
static constexpr Color OrangeRed()
static constexpr Color MediumAquamarine()
static constexpr Color DeepSkyBlue()
static constexpr Color DarkGreen()
static constexpr Color Orange()
static constexpr Color Teal()
static constexpr Color Purple()
static constexpr Color Wheat()
static constexpr Color Cornsilk()
static constexpr Color Aqua()
static constexpr Color Tan()
static constexpr Color Coral()
friend H AbslHashValue(H h, const Color &c)
static constexpr Color Red()
static constexpr Color PaleTurquoise()
constexpr Color Unpremultiply() const
static constexpr Color LightGoldenrodYellow()
static constexpr Color LightYellow()
static constexpr Color SteelBlue()
static constexpr Color DarkRed()
static constexpr Color MediumSpringGreen()
static constexpr Color MediumPurple()
constexpr Color Premultiply() const
static constexpr Color Firebrick()
static constexpr Color LightGreen()
static constexpr Color Pink()
static constexpr Color DarkOrange()
static constexpr Color ForestGreen()
static constexpr Color Silver()
static constexpr Color Brown()
static constexpr Color Gainsboro()
static constexpr Color Peachpuff()
static constexpr Color MediumSlateBlue()
static constexpr Color Seagreen()
static constexpr Color AliceBlue()
static constexpr Color Salmon()
static constexpr Color MakeRGBA8(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
static constexpr Color DarkSlateBlue()
static constexpr Color AquaMarine()
constexpr Color operator-(T value) const
static constexpr Color AntiqueWhite()
static constexpr Color Lavender()
static constexpr Color Plum()
static constexpr Color LightSeaGreen()
static constexpr Color DarkSeagreen()
static constexpr Color NavajoWhite()
constexpr Color Clamp01() const
static constexpr Color LightCyan()
static constexpr Color DimGray()
static constexpr Color Tomato()
static constexpr Color FloralWhite()
static constexpr Color Linen()
static constexpr Color YellowGreen()
static constexpr Color DarkSlateGrey()
static constexpr Color DarkGray()
static constexpr Color Lerp(Color a, Color b, Scalar t)
Return a color that is linearly interpolated between colors a and b, according to the value of t.
static constexpr Color DarkMagenta()
static constexpr Color Yellow()
static constexpr Color Goldenrod()
Color SRGBToLinear() const
Convert the color from sRGB space to linear space.
static constexpr Color Peru()
static constexpr Color MediumVioletRed()
static constexpr Color SlateGrey()
Color Blend(Color source, BlendMode blend_mode) const
Blends an unpremultiplied destination color into a given unpremultiplied source color to form a new u...
static constexpr Color LightSlateGrey()
constexpr Color operator-(const Color &c) const
static constexpr Color DarkViolet()
static constexpr Color OliveDrab()
static constexpr Color PaleGoldenrod()
static constexpr Color RosyBrown()
static constexpr Color Blue()
std::array< uint8_t, 4 > ToR8G8B8A8() const
Convert to R8G8B8A8 representation.
static constexpr Color Green()
static constexpr Color DarkSlateGray()
static constexpr Color Whitesmoke()