5#ifndef FLUTTER_IMPELLER_GEOMETRY_COLOR_H_
6#define FLUTTER_IMPELLER_GEOMETRY_COLOR_H_
19#define IMPELLER_FOR_EACH_BLEND_MODE(V) \
156 static_cast<Scalar>(r) / 255.0f,
static_cast<Scalar>(g) / 255.0f,
157 static_cast<Scalar>(
b) / 255.0f,
static_cast<Scalar>(
a) / 255.0f);
162 return (((std::lround(
color.alpha * 255.0f) & 0xff) << 24) |
163 ((std::lround(
color.red * 255.0f) & 0xff) << 16) |
164 ((std::lround(
color.green * 255.0f) & 0xff) << 8) |
165 ((std::lround(
color.blue * 255.0f) & 0xff) << 0)) &
178 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
188 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
198 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
208 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
235 return a + (
b -
a) * t;
239 return Color(std::clamp(
red, 0.0f, 1.0f), std::clamp(
green, 0.0f, 1.0f),
240 std::clamp(
blue, 0.0f, 1.0f), std::clamp(
alpha, 0.0f, 1.0f));
249 uint8_t r = std::round(
red * 255.0f);
250 uint8_t g = std::round(
green * 255.0f);
251 uint8_t
b = std::round(
blue * 255.0f);
252 uint8_t
a = std::round(
alpha * 255.0f);
256 static constexpr Color White() {
return {1.0f, 1.0f, 1.0f, 1.0f}; }
258 static constexpr Color Black() {
return {0.0f, 0.0f, 0.0f, 1.0f}; }
264 static constexpr Color Red() {
return {1.0f, 0.0f, 0.0f, 1.0f}; }
266 static constexpr Color Green() {
return {0.0f, 1.0f, 0.0f, 1.0f}; }
268 static constexpr Color Blue() {
return {0.0f, 0.0f, 1.0f, 1.0f}; }
275 return {240.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
279 return {250.0f / 255.0f, 235.0f / 255.0f, 215.0f / 255.0f, 1.0f};
283 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
287 return {127.0f / 255.0f, 255.0f / 255.0f, 212.0f / 255.0f, 1.0f};
291 return {240.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
295 return {245.0f / 255.0f, 245.0f / 255.0f, 220.0f / 255.0f, 1.0f};
299 return {255.0f / 255.0f, 228.0f / 255.0f, 196.0f / 255.0f, 1.0f};
303 return {255.0f / 255.0f, 235.0f / 255.0f, 205.0f / 255.0f, 1.0f};
307 return {138.0f / 255.0f, 43.0f / 255.0f, 226.0f / 255.0f, 1.0f};
311 return {165.0f / 255.0f, 42.0f / 255.0f, 42.0f / 255.0f, 1.0f};
315 return {222.0f / 255.0f, 184.0f / 255.0f, 135.0f / 255.0f, 1.0f};
319 return {95.0f / 255.0f, 158.0f / 255.0f, 160.0f / 255.0f, 1.0f};
323 return {127.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
327 return {210.0f / 255.0f, 105.0f / 255.0f, 30.0f / 255.0f, 1.0f};
331 return {255.0f / 255.0f, 127.0f / 255.0f, 80.0f / 255.0f, 1.0f};
335 return {100.0f / 255.0f, 149.0f / 255.0f, 237.0f / 255.0f, 1.0f};
339 return {255.0f / 255.0f, 248.0f / 255.0f, 220.0f / 255.0f, 1.0f};
343 return {220.0f / 255.0f, 20.0f / 255.0f, 60.0f / 255.0f, 1.0f};
347 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
351 return {0.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
355 return {0.0f / 255.0f, 139.0f / 255.0f, 139.0f / 255.0f, 1.0f};
359 return {184.0f / 255.0f, 134.0f / 255.0f, 11.0f / 255.0f, 1.0f};
363 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
367 return {0.0f / 255.0f, 100.0f / 255.0f, 0.0f / 255.0f, 1.0f};
371 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
375 return {189.0f / 255.0f, 183.0f / 255.0f, 107.0f / 255.0f, 1.0f};
379 return {139.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
383 return {85.0f / 255.0f, 107.0f / 255.0f, 47.0f / 255.0f, 1.0f};
387 return {255.0f / 255.0f, 140.0f / 255.0f, 0.0f / 255.0f, 1.0f};
391 return {153.0f / 255.0f, 50.0f / 255.0f, 204.0f / 255.0f, 1.0f};
395 return {139.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
399 return {233.0f / 255.0f, 150.0f / 255.0f, 122.0f / 255.0f, 1.0f};
403 return {143.0f / 255.0f, 188.0f / 255.0f, 143.0f / 255.0f, 1.0f};
407 return {72.0f / 255.0f, 61.0f / 255.0f, 139.0f / 255.0f, 1.0f};
411 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
415 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
419 return {0.0f / 255.0f, 206.0f / 255.0f, 209.0f / 255.0f, 1.0f};
423 return {148.0f / 255.0f, 0.0f / 255.0f, 211.0f / 255.0f, 1.0f};
427 return {255.0f / 255.0f, 20.0f / 255.0f, 147.0f / 255.0f, 1.0f};
431 return {0.0f / 255.0f, 191.0f / 255.0f, 255.0f / 255.0f, 1.0f};
435 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
439 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
443 return {30.0f / 255.0f, 144.0f / 255.0f, 255.0f / 255.0f, 1.0f};
447 return {178.0f / 255.0f, 34.0f / 255.0f, 34.0f / 255.0f, 1.0f};
451 return {255.0f / 255.0f, 250.0f / 255.0f, 240.0f / 255.0f, 1.0f};
455 return {34.0f / 255.0f, 139.0f / 255.0f, 34.0f / 255.0f, 1.0f};
459 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
463 return {220.0f / 255.0f, 220.0f / 255.0f, 220.0f / 255.0f, 1.0f};
467 return {248.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
471 return {255.0f / 255.0f, 215.0f / 255.0f, 0.0f / 255.0f, 1.0f};
475 return {218.0f / 255.0f, 165.0f / 255.0f, 32.0f / 255.0f, 1.0f};
479 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
483 return {173.0f / 255.0f, 255.0f / 255.0f, 47.0f / 255.0f, 1.0f};
487 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
491 return {240.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
495 return {255.0f / 255.0f, 105.0f / 255.0f, 180.0f / 255.0f, 1.0f};
499 return {205.0f / 255.0f, 92.0f / 255.0f, 92.0f / 255.0f, 1.0f};
503 return {75.0f / 255.0f, 0.0f / 255.0f, 130.0f / 255.0f, 1.0f};
507 return {255.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
511 return {240.0f / 255.0f, 230.0f / 255.0f, 140.0f / 255.0f, 1.0f};
515 return {230.0f / 255.0f, 230.0f / 255.0f, 250.0f / 255.0f, 1.0f};
519 return {255.0f / 255.0f, 240.0f / 255.0f, 245.0f / 255.0f, 1.0f};
523 return {124.0f / 255.0f, 252.0f / 255.0f, 0.0f / 255.0f, 1.0f};
527 return {255.0f / 255.0f, 250.0f / 255.0f, 205.0f / 255.0f, 1.0f};
531 return {173.0f / 255.0f, 216.0f / 255.0f, 230.0f / 255.0f, 1.0f};
535 return {240.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
539 return {224.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
543 return {50.0f / 255.0f, 250.0f / 255.0f, 210.0f / 255.0f, 1.0f};
547 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
551 return {144.0f / 255.0f, 238.0f / 255.0f, 144.0f / 255.0f, 1.0f};
555 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
559 return {255.0f / 255.0f, 182.0f / 255.0f, 193.0f / 255.0f, 1.0f};
563 return {255.0f / 255.0f, 160.0f / 255.0f, 122.0f / 255.0f, 1.0f};
567 return {32.0f / 255.0f, 178.0f / 255.0f, 170.0f / 255.0f, 1.0f};
571 return {135.0f / 255.0f, 206.0f / 255.0f, 250.0f / 255.0f, 1.0f};
575 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
579 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
583 return {176.0f / 255.0f, 196.0f / 255.0f, 222.0f / 255.0f, 1.0f};
587 return {255.0f / 255.0f, 255.0f / 255.0f, 224.0f / 255.0f, 1.0f};
591 return {0.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
595 return {50.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
599 return {250.0f / 255.0f, 240.0f / 255.0f, 230.0f / 255.0f, 1.0f};
603 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
607 return {128.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
611 return {102.0f / 255.0f, 205.0f / 255.0f, 170.0f / 255.0f, 1.0f};
615 return {0.0f / 255.0f, 0.0f / 255.0f, 205.0f / 255.0f, 1.0f};
619 return {186.0f / 255.0f, 85.0f / 255.0f, 211.0f / 255.0f, 1.0f};
623 return {147.0f / 255.0f, 112.0f / 255.0f, 219.0f / 255.0f, 1.0f};
627 return {60.0f / 255.0f, 179.0f / 255.0f, 113.0f / 255.0f, 1.0f};
631 return {123.0f / 255.0f, 104.0f / 255.0f, 238.0f / 255.0f, 1.0f};
635 return {0.0f / 255.0f, 250.0f / 255.0f, 154.0f / 255.0f, 1.0f};
639 return {72.0f / 255.0f, 209.0f / 255.0f, 204.0f / 255.0f, 1.0f};
643 return {199.0f / 255.0f, 21.0f / 255.0f, 133.0f / 255.0f, 1.0f};
647 return {25.0f / 255.0f, 25.0f / 255.0f, 112.0f / 255.0f, 1.0f};
651 return {245.0f / 255.0f, 255.0f / 255.0f, 250.0f / 255.0f, 1.0f};
655 return {255.0f / 255.0f, 228.0f / 255.0f, 225.0f / 255.0f, 1.0f};
659 return {255.0f / 255.0f, 228.0f / 255.0f, 181.0f / 255.0f, 1.0f};
663 return {255.0f / 255.0f, 222.0f / 255.0f, 173.0f / 255.0f, 1.0f};
667 return {0.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
671 return {253.0f / 255.0f, 245.0f / 255.0f, 230.0f / 255.0f, 1.0f};
675 return {128.0f / 255.0f, 128.0f / 255.0f, 0.0f / 255.0f, 1.0f};
679 return {107.0f / 255.0f, 142.0f / 255.0f, 35.0f / 255.0f, 1.0f};
683 return {255.0f / 255.0f, 165.0f / 255.0f, 0.0f / 255.0f, 1.0f};
687 return {255.0f / 255.0f, 69.0f / 255.0f, 0.0f / 255.0f, 1.0f};
691 return {218.0f / 255.0f, 112.0f / 255.0f, 214.0f / 255.0f, 1.0f};
695 return {238.0f / 255.0f, 232.0f / 255.0f, 170.0f / 255.0f, 1.0f};
699 return {152.0f / 255.0f, 251.0f / 255.0f, 152.0f / 255.0f, 1.0f};
703 return {175.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f, 1.0f};
707 return {219.0f / 255.0f, 112.0f / 255.0f, 147.0f / 255.0f, 1.0f};
711 return {255.0f / 255.0f, 239.0f / 255.0f, 213.0f / 255.0f, 1.0f};
715 return {255.0f / 255.0f, 218.0f / 255.0f, 185.0f / 255.0f, 1.0f};
719 return {205.0f / 255.0f, 133.0f / 255.0f, 63.0f / 255.0f, 1.0f};
723 return {255.0f / 255.0f, 192.0f / 255.0f, 203.0f / 255.0f, 1.0f};
727 return {221.0f / 255.0f, 160.0f / 255.0f, 221.0f / 255.0f, 1.0f};
731 return {176.0f / 255.0f, 224.0f / 255.0f, 230.0f / 255.0f, 1.0f};
735 return {128.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
739 return {188.0f / 255.0f, 143.0f / 255.0f, 143.0f / 255.0f, 1.0f};
743 return {65.0f / 255.0f, 105.0f / 255.0f, 225.0f / 255.0f, 1.0f};
747 return {139.0f / 255.0f, 69.0f / 255.0f, 19.0f / 255.0f, 1.0f};
751 return {250.0f / 255.0f, 128.0f / 255.0f, 114.0f / 255.0f, 1.0f};
755 return {244.0f / 255.0f, 164.0f / 255.0f, 96.0f / 255.0f, 1.0f};
759 return {46.0f / 255.0f, 139.0f / 255.0f, 87.0f / 255.0f, 1.0f};
763 return {255.0f / 255.0f, 245.0f / 255.0f, 238.0f / 255.0f, 1.0f};
767 return {160.0f / 255.0f, 82.0f / 255.0f, 45.0f / 255.0f, 1.0f};
771 return {192.0f / 255.0f, 192.0f / 255.0f, 192.0f / 255.0f, 1.0f};
775 return {135.0f / 255.0f, 206.0f / 255.0f, 235.0f / 255.0f, 1.0f};
779 return {106.0f / 255.0f, 90.0f / 255.0f, 205.0f / 255.0f, 1.0f};
783 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
787 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
791 return {255.0f / 255.0f, 250.0f / 255.0f, 250.0f / 255.0f, 1.0f};
795 return {0.0f / 255.0f, 255.0f / 255.0f, 127.0f / 255.0f, 1.0f};
799 return {70.0f / 255.0f, 130.0f / 255.0f, 180.0f / 255.0f, 1.0f};
803 return {210.0f / 255.0f, 180.0f / 255.0f, 140.0f / 255.0f, 1.0f};
807 return {0.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
811 return {216.0f / 255.0f, 191.0f / 255.0f, 216.0f / 255.0f, 1.0f};
815 return {255.0f / 255.0f, 99.0f / 255.0f, 71.0f / 255.0f, 1.0f};
819 return {64.0f / 255.0f, 224.0f / 255.0f, 208.0f / 255.0f, 1.0f};
823 return {238.0f / 255.0f, 130.0f / 255.0f, 238.0f / 255.0f, 1.0f};
827 return {245.0f / 255.0f, 222.0f / 255.0f, 179.0f / 255.0f, 1.0f};
831 return {245.0f / 255.0f, 245.0f / 255.0f, 245.0f / 255.0f, 1.0f};
835 return {255.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
839 return {154.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
846 static_cast<Scalar>((std::rand() % 255) / 255.0f),
847 static_cast<Scalar>((std::rand() % 255) / 255.0f),
848 static_cast<Scalar>((std::rand() % 255) / 255.0f),
889template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
894template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
900template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
905template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
945static_assert(
sizeof(Color) == 4 *
sizeof(
Scalar));
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)
std::string ColorToString(const Color &color)
constexpr bool ScalarNearlyEqual(Scalar x, Scalar y, Scalar tolerance=kEhCloseEnough)
std::ostream & operator<<(std::ostream &out, const impeller::Color &c)
static ColorHSB FromRGB(Color rgb)
constexpr ColorHSB(Scalar h, Scalar s, Scalar b, Scalar a)
static constexpr Color MidnightBlue()
static constexpr Color Crimson()
static constexpr Color SaddleBrown()
constexpr std::array< uint8_t, 4 > ToR8G8B8A8() const
Convert to R8G8B8A8 representation.
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 constexpr Color DarkOrchid()
static constexpr Color Lime()
static constexpr uint32_t ToIColor(Color color)
Convert this color to a 32-bit representation.
static constexpr Color DarkSalmon()
static constexpr Color Grey()
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()
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()
static constexpr Color Green()
static constexpr Color DarkSlateGray()
static constexpr Color Whitesmoke()