5 #ifndef FLUTTER_IMPELLER_GEOMETRY_COLOR_H_
6 #define FLUTTER_IMPELLER_GEOMETRY_COLOR_H_
14 #include <type_traits>
19 #define IMPELLER_FOR_EACH_BLEND_MODE(V) \
153 static_cast<Scalar>(r) / 255.0f,
static_cast<Scalar>(g) / 255.0f,
154 static_cast<Scalar>(
b) / 255.0f,
static_cast<Scalar>(a) / 255.0f);
159 return (((std::lround(color.
alpha * 255.0f) & 0xff) << 24) |
160 ((std::lround(color.
red * 255.0f) & 0xff) << 16) |
161 ((std::lround(color.
green * 255.0f) & 0xff) << 8) |
162 ((std::lround(color.
blue * 255.0f) & 0xff) << 0)) &
175 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
185 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
195 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
205 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
232 return a + (
b - a) * t;
236 return Color(std::clamp(
red, 0.0f, 1.0f), std::clamp(
green, 0.0f, 1.0f),
237 std::clamp(
blue, 0.0f, 1.0f), std::clamp(
alpha, 0.0f, 1.0f));
246 uint8_t r = std::round(
red * 255.0f);
247 uint8_t g = std::round(
green * 255.0f);
248 uint8_t
b = std::round(
blue * 255.0f);
249 uint8_t a = std::round(
alpha * 255.0f);
260 return result[3] << 24 | result[0] << 16 | result[1] << 8 | result[2];
263 static constexpr
Color White() {
return {1.0f, 1.0f, 1.0f, 1.0f}; }
265 static constexpr
Color Black() {
return {0.0f, 0.0f, 0.0f, 1.0f}; }
271 static constexpr
Color Red() {
return {1.0f, 0.0f, 0.0f, 1.0f}; }
273 static constexpr
Color Green() {
return {0.0f, 1.0f, 0.0f, 1.0f}; }
275 static constexpr
Color Blue() {
return {0.0f, 0.0f, 1.0f, 1.0f}; }
282 return {240.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
286 return {250.0f / 255.0f, 235.0f / 255.0f, 215.0f / 255.0f, 1.0f};
290 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
294 return {127.0f / 255.0f, 255.0f / 255.0f, 212.0f / 255.0f, 1.0f};
298 return {240.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
302 return {245.0f / 255.0f, 245.0f / 255.0f, 220.0f / 255.0f, 1.0f};
306 return {255.0f / 255.0f, 228.0f / 255.0f, 196.0f / 255.0f, 1.0f};
310 return {255.0f / 255.0f, 235.0f / 255.0f, 205.0f / 255.0f, 1.0f};
314 return {138.0f / 255.0f, 43.0f / 255.0f, 226.0f / 255.0f, 1.0f};
318 return {165.0f / 255.0f, 42.0f / 255.0f, 42.0f / 255.0f, 1.0f};
322 return {222.0f / 255.0f, 184.0f / 255.0f, 135.0f / 255.0f, 1.0f};
326 return {95.0f / 255.0f, 158.0f / 255.0f, 160.0f / 255.0f, 1.0f};
330 return {127.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
334 return {210.0f / 255.0f, 105.0f / 255.0f, 30.0f / 255.0f, 1.0f};
338 return {255.0f / 255.0f, 127.0f / 255.0f, 80.0f / 255.0f, 1.0f};
342 return {100.0f / 255.0f, 149.0f / 255.0f, 237.0f / 255.0f, 1.0f};
346 return {255.0f / 255.0f, 248.0f / 255.0f, 220.0f / 255.0f, 1.0f};
350 return {220.0f / 255.0f, 20.0f / 255.0f, 60.0f / 255.0f, 1.0f};
354 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
358 return {0.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
362 return {0.0f / 255.0f, 139.0f / 255.0f, 139.0f / 255.0f, 1.0f};
366 return {184.0f / 255.0f, 134.0f / 255.0f, 11.0f / 255.0f, 1.0f};
370 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
374 return {0.0f / 255.0f, 100.0f / 255.0f, 0.0f / 255.0f, 1.0f};
378 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
382 return {189.0f / 255.0f, 183.0f / 255.0f, 107.0f / 255.0f, 1.0f};
386 return {139.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
390 return {85.0f / 255.0f, 107.0f / 255.0f, 47.0f / 255.0f, 1.0f};
394 return {255.0f / 255.0f, 140.0f / 255.0f, 0.0f / 255.0f, 1.0f};
398 return {153.0f / 255.0f, 50.0f / 255.0f, 204.0f / 255.0f, 1.0f};
402 return {139.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
406 return {233.0f / 255.0f, 150.0f / 255.0f, 122.0f / 255.0f, 1.0f};
410 return {143.0f / 255.0f, 188.0f / 255.0f, 143.0f / 255.0f, 1.0f};
414 return {72.0f / 255.0f, 61.0f / 255.0f, 139.0f / 255.0f, 1.0f};
418 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
422 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
426 return {0.0f / 255.0f, 206.0f / 255.0f, 209.0f / 255.0f, 1.0f};
430 return {148.0f / 255.0f, 0.0f / 255.0f, 211.0f / 255.0f, 1.0f};
434 return {255.0f / 255.0f, 20.0f / 255.0f, 147.0f / 255.0f, 1.0f};
438 return {0.0f / 255.0f, 191.0f / 255.0f, 255.0f / 255.0f, 1.0f};
442 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
446 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
450 return {30.0f / 255.0f, 144.0f / 255.0f, 255.0f / 255.0f, 1.0f};
454 return {178.0f / 255.0f, 34.0f / 255.0f, 34.0f / 255.0f, 1.0f};
458 return {255.0f / 255.0f, 250.0f / 255.0f, 240.0f / 255.0f, 1.0f};
462 return {34.0f / 255.0f, 139.0f / 255.0f, 34.0f / 255.0f, 1.0f};
466 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
470 return {220.0f / 255.0f, 220.0f / 255.0f, 220.0f / 255.0f, 1.0f};
474 return {248.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
478 return {255.0f / 255.0f, 215.0f / 255.0f, 0.0f / 255.0f, 1.0f};
482 return {218.0f / 255.0f, 165.0f / 255.0f, 32.0f / 255.0f, 1.0f};
486 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
490 return {173.0f / 255.0f, 255.0f / 255.0f, 47.0f / 255.0f, 1.0f};
494 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
498 return {240.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
502 return {255.0f / 255.0f, 105.0f / 255.0f, 180.0f / 255.0f, 1.0f};
506 return {205.0f / 255.0f, 92.0f / 255.0f, 92.0f / 255.0f, 1.0f};
510 return {75.0f / 255.0f, 0.0f / 255.0f, 130.0f / 255.0f, 1.0f};
514 return {255.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
518 return {240.0f / 255.0f, 230.0f / 255.0f, 140.0f / 255.0f, 1.0f};
522 return {230.0f / 255.0f, 230.0f / 255.0f, 250.0f / 255.0f, 1.0f};
526 return {255.0f / 255.0f, 240.0f / 255.0f, 245.0f / 255.0f, 1.0f};
530 return {124.0f / 255.0f, 252.0f / 255.0f, 0.0f / 255.0f, 1.0f};
534 return {255.0f / 255.0f, 250.0f / 255.0f, 205.0f / 255.0f, 1.0f};
538 return {173.0f / 255.0f, 216.0f / 255.0f, 230.0f / 255.0f, 1.0f};
542 return {240.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
546 return {224.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
550 return {50.0f / 255.0f, 250.0f / 255.0f, 210.0f / 255.0f, 1.0f};
554 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
558 return {144.0f / 255.0f, 238.0f / 255.0f, 144.0f / 255.0f, 1.0f};
562 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
566 return {255.0f / 255.0f, 182.0f / 255.0f, 193.0f / 255.0f, 1.0f};
570 return {255.0f / 255.0f, 160.0f / 255.0f, 122.0f / 255.0f, 1.0f};
574 return {32.0f / 255.0f, 178.0f / 255.0f, 170.0f / 255.0f, 1.0f};
578 return {135.0f / 255.0f, 206.0f / 255.0f, 250.0f / 255.0f, 1.0f};
582 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
586 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
590 return {176.0f / 255.0f, 196.0f / 255.0f, 222.0f / 255.0f, 1.0f};
594 return {255.0f / 255.0f, 255.0f / 255.0f, 224.0f / 255.0f, 1.0f};
598 return {0.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
602 return {50.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
606 return {250.0f / 255.0f, 240.0f / 255.0f, 230.0f / 255.0f, 1.0f};
610 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
614 return {128.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
618 return {102.0f / 255.0f, 205.0f / 255.0f, 170.0f / 255.0f, 1.0f};
622 return {0.0f / 255.0f, 0.0f / 255.0f, 205.0f / 255.0f, 1.0f};
626 return {186.0f / 255.0f, 85.0f / 255.0f, 211.0f / 255.0f, 1.0f};
630 return {147.0f / 255.0f, 112.0f / 255.0f, 219.0f / 255.0f, 1.0f};
634 return {60.0f / 255.0f, 179.0f / 255.0f, 113.0f / 255.0f, 1.0f};
638 return {123.0f / 255.0f, 104.0f / 255.0f, 238.0f / 255.0f, 1.0f};
642 return {0.0f / 255.0f, 250.0f / 255.0f, 154.0f / 255.0f, 1.0f};
646 return {72.0f / 255.0f, 209.0f / 255.0f, 204.0f / 255.0f, 1.0f};
650 return {199.0f / 255.0f, 21.0f / 255.0f, 133.0f / 255.0f, 1.0f};
654 return {25.0f / 255.0f, 25.0f / 255.0f, 112.0f / 255.0f, 1.0f};
658 return {245.0f / 255.0f, 255.0f / 255.0f, 250.0f / 255.0f, 1.0f};
662 return {255.0f / 255.0f, 228.0f / 255.0f, 225.0f / 255.0f, 1.0f};
666 return {255.0f / 255.0f, 228.0f / 255.0f, 181.0f / 255.0f, 1.0f};
670 return {255.0f / 255.0f, 222.0f / 255.0f, 173.0f / 255.0f, 1.0f};
674 return {0.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
678 return {253.0f / 255.0f, 245.0f / 255.0f, 230.0f / 255.0f, 1.0f};
682 return {128.0f / 255.0f, 128.0f / 255.0f, 0.0f / 255.0f, 1.0f};
686 return {107.0f / 255.0f, 142.0f / 255.0f, 35.0f / 255.0f, 1.0f};
690 return {255.0f / 255.0f, 165.0f / 255.0f, 0.0f / 255.0f, 1.0f};
694 return {255.0f / 255.0f, 69.0f / 255.0f, 0.0f / 255.0f, 1.0f};
698 return {218.0f / 255.0f, 112.0f / 255.0f, 214.0f / 255.0f, 1.0f};
702 return {238.0f / 255.0f, 232.0f / 255.0f, 170.0f / 255.0f, 1.0f};
706 return {152.0f / 255.0f, 251.0f / 255.0f, 152.0f / 255.0f, 1.0f};
710 return {175.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f, 1.0f};
714 return {219.0f / 255.0f, 112.0f / 255.0f, 147.0f / 255.0f, 1.0f};
718 return {255.0f / 255.0f, 239.0f / 255.0f, 213.0f / 255.0f, 1.0f};
722 return {255.0f / 255.0f, 218.0f / 255.0f, 185.0f / 255.0f, 1.0f};
726 return {205.0f / 255.0f, 133.0f / 255.0f, 63.0f / 255.0f, 1.0f};
730 return {255.0f / 255.0f, 192.0f / 255.0f, 203.0f / 255.0f, 1.0f};
734 return {221.0f / 255.0f, 160.0f / 255.0f, 221.0f / 255.0f, 1.0f};
738 return {176.0f / 255.0f, 224.0f / 255.0f, 230.0f / 255.0f, 1.0f};
742 return {128.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
746 return {188.0f / 255.0f, 143.0f / 255.0f, 143.0f / 255.0f, 1.0f};
750 return {65.0f / 255.0f, 105.0f / 255.0f, 225.0f / 255.0f, 1.0f};
754 return {139.0f / 255.0f, 69.0f / 255.0f, 19.0f / 255.0f, 1.0f};
758 return {250.0f / 255.0f, 128.0f / 255.0f, 114.0f / 255.0f, 1.0f};
762 return {244.0f / 255.0f, 164.0f / 255.0f, 96.0f / 255.0f, 1.0f};
766 return {46.0f / 255.0f, 139.0f / 255.0f, 87.0f / 255.0f, 1.0f};
770 return {255.0f / 255.0f, 245.0f / 255.0f, 238.0f / 255.0f, 1.0f};
774 return {160.0f / 255.0f, 82.0f / 255.0f, 45.0f / 255.0f, 1.0f};
778 return {192.0f / 255.0f, 192.0f / 255.0f, 192.0f / 255.0f, 1.0f};
782 return {135.0f / 255.0f, 206.0f / 255.0f, 235.0f / 255.0f, 1.0f};
786 return {106.0f / 255.0f, 90.0f / 255.0f, 205.0f / 255.0f, 1.0f};
790 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
794 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
798 return {255.0f / 255.0f, 250.0f / 255.0f, 250.0f / 255.0f, 1.0f};
802 return {0.0f / 255.0f, 255.0f / 255.0f, 127.0f / 255.0f, 1.0f};
806 return {70.0f / 255.0f, 130.0f / 255.0f, 180.0f / 255.0f, 1.0f};
810 return {210.0f / 255.0f, 180.0f / 255.0f, 140.0f / 255.0f, 1.0f};
814 return {0.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
818 return {216.0f / 255.0f, 191.0f / 255.0f, 216.0f / 255.0f, 1.0f};
822 return {255.0f / 255.0f, 99.0f / 255.0f, 71.0f / 255.0f, 1.0f};
826 return {64.0f / 255.0f, 224.0f / 255.0f, 208.0f / 255.0f, 1.0f};
830 return {238.0f / 255.0f, 130.0f / 255.0f, 238.0f / 255.0f, 1.0f};
834 return {245.0f / 255.0f, 222.0f / 255.0f, 179.0f / 255.0f, 1.0f};
838 return {245.0f / 255.0f, 245.0f / 255.0f, 245.0f / 255.0f, 1.0f};
842 return {255.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
846 return {154.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
853 static_cast<Scalar>((std::rand() % 255) / 255.0f),
854 static_cast<Scalar>((std::rand() % 255) / 255.0f),
855 static_cast<Scalar>((std::rand() % 255) / 255.0f),
896 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
901 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
907 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
912 template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
920 static_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 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()
constexpr uint32_t ToARGB() const
Convert to ARGB 32 bit color.
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()
constexpr static 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 DarkGray()
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()