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;
266 static constexpr Color White() {
return {1.0f, 1.0f, 1.0f, 1.0f}; }
268 static constexpr Color Black() {
return {0.0f, 0.0f, 0.0f, 1.0f}; }
274 static constexpr Color Red() {
return {1.0f, 0.0f, 0.0f, 1.0f}; }
276 static constexpr Color Green() {
return {0.0f, 1.0f, 0.0f, 1.0f}; }
278 static constexpr Color Blue() {
return {0.0f, 0.0f, 1.0f, 1.0f}; }
285 return {240.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
289 return {250.0f / 255.0f, 235.0f / 255.0f, 215.0f / 255.0f, 1.0f};
293 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
297 return {127.0f / 255.0f, 255.0f / 255.0f, 212.0f / 255.0f, 1.0f};
301 return {240.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
305 return {245.0f / 255.0f, 245.0f / 255.0f, 220.0f / 255.0f, 1.0f};
309 return {255.0f / 255.0f, 228.0f / 255.0f, 196.0f / 255.0f, 1.0f};
313 return {255.0f / 255.0f, 235.0f / 255.0f, 205.0f / 255.0f, 1.0f};
317 return {138.0f / 255.0f, 43.0f / 255.0f, 226.0f / 255.0f, 1.0f};
321 return {165.0f / 255.0f, 42.0f / 255.0f, 42.0f / 255.0f, 1.0f};
325 return {222.0f / 255.0f, 184.0f / 255.0f, 135.0f / 255.0f, 1.0f};
329 return {95.0f / 255.0f, 158.0f / 255.0f, 160.0f / 255.0f, 1.0f};
333 return {127.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
337 return {210.0f / 255.0f, 105.0f / 255.0f, 30.0f / 255.0f, 1.0f};
341 return {255.0f / 255.0f, 127.0f / 255.0f, 80.0f / 255.0f, 1.0f};
345 return {100.0f / 255.0f, 149.0f / 255.0f, 237.0f / 255.0f, 1.0f};
349 return {255.0f / 255.0f, 248.0f / 255.0f, 220.0f / 255.0f, 1.0f};
353 return {220.0f / 255.0f, 20.0f / 255.0f, 60.0f / 255.0f, 1.0f};
357 return {0.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
361 return {0.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
365 return {0.0f / 255.0f, 139.0f / 255.0f, 139.0f / 255.0f, 1.0f};
369 return {184.0f / 255.0f, 134.0f / 255.0f, 11.0f / 255.0f, 1.0f};
373 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
377 return {0.0f / 255.0f, 100.0f / 255.0f, 0.0f / 255.0f, 1.0f};
381 return {169.0f / 255.0f, 169.0f / 255.0f, 169.0f / 255.0f, 1.0f};
385 return {189.0f / 255.0f, 183.0f / 255.0f, 107.0f / 255.0f, 1.0f};
389 return {139.0f / 255.0f, 0.0f / 255.0f, 139.0f / 255.0f, 1.0f};
393 return {85.0f / 255.0f, 107.0f / 255.0f, 47.0f / 255.0f, 1.0f};
397 return {255.0f / 255.0f, 140.0f / 255.0f, 0.0f / 255.0f, 1.0f};
401 return {153.0f / 255.0f, 50.0f / 255.0f, 204.0f / 255.0f, 1.0f};
405 return {139.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
409 return {233.0f / 255.0f, 150.0f / 255.0f, 122.0f / 255.0f, 1.0f};
413 return {143.0f / 255.0f, 188.0f / 255.0f, 143.0f / 255.0f, 1.0f};
417 return {72.0f / 255.0f, 61.0f / 255.0f, 139.0f / 255.0f, 1.0f};
421 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
425 return {47.0f / 255.0f, 79.0f / 255.0f, 79.0f / 255.0f, 1.0f};
429 return {0.0f / 255.0f, 206.0f / 255.0f, 209.0f / 255.0f, 1.0f};
433 return {148.0f / 255.0f, 0.0f / 255.0f, 211.0f / 255.0f, 1.0f};
437 return {255.0f / 255.0f, 20.0f / 255.0f, 147.0f / 255.0f, 1.0f};
441 return {0.0f / 255.0f, 191.0f / 255.0f, 255.0f / 255.0f, 1.0f};
445 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
449 return {105.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 1.0f};
453 return {30.0f / 255.0f, 144.0f / 255.0f, 255.0f / 255.0f, 1.0f};
457 return {178.0f / 255.0f, 34.0f / 255.0f, 34.0f / 255.0f, 1.0f};
461 return {255.0f / 255.0f, 250.0f / 255.0f, 240.0f / 255.0f, 1.0f};
465 return {34.0f / 255.0f, 139.0f / 255.0f, 34.0f / 255.0f, 1.0f};
469 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
473 return {220.0f / 255.0f, 220.0f / 255.0f, 220.0f / 255.0f, 1.0f};
477 return {248.0f / 255.0f, 248.0f / 255.0f, 255.0f / 255.0f, 1.0f};
481 return {255.0f / 255.0f, 215.0f / 255.0f, 0.0f / 255.0f, 1.0f};
485 return {218.0f / 255.0f, 165.0f / 255.0f, 32.0f / 255.0f, 1.0f};
489 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
493 return {173.0f / 255.0f, 255.0f / 255.0f, 47.0f / 255.0f, 1.0f};
497 return {128.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
501 return {240.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
505 return {255.0f / 255.0f, 105.0f / 255.0f, 180.0f / 255.0f, 1.0f};
509 return {205.0f / 255.0f, 92.0f / 255.0f, 92.0f / 255.0f, 1.0f};
513 return {75.0f / 255.0f, 0.0f / 255.0f, 130.0f / 255.0f, 1.0f};
517 return {255.0f / 255.0f, 255.0f / 255.0f, 240.0f / 255.0f, 1.0f};
521 return {240.0f / 255.0f, 230.0f / 255.0f, 140.0f / 255.0f, 1.0f};
525 return {230.0f / 255.0f, 230.0f / 255.0f, 250.0f / 255.0f, 1.0f};
529 return {255.0f / 255.0f, 240.0f / 255.0f, 245.0f / 255.0f, 1.0f};
533 return {124.0f / 255.0f, 252.0f / 255.0f, 0.0f / 255.0f, 1.0f};
537 return {255.0f / 255.0f, 250.0f / 255.0f, 205.0f / 255.0f, 1.0f};
541 return {173.0f / 255.0f, 216.0f / 255.0f, 230.0f / 255.0f, 1.0f};
545 return {240.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
549 return {224.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 1.0f};
553 return {50.0f / 255.0f, 250.0f / 255.0f, 210.0f / 255.0f, 1.0f};
557 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
561 return {144.0f / 255.0f, 238.0f / 255.0f, 144.0f / 255.0f, 1.0f};
565 return {211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f};
569 return {255.0f / 255.0f, 182.0f / 255.0f, 193.0f / 255.0f, 1.0f};
573 return {255.0f / 255.0f, 160.0f / 255.0f, 122.0f / 255.0f, 1.0f};
577 return {32.0f / 255.0f, 178.0f / 255.0f, 170.0f / 255.0f, 1.0f};
581 return {135.0f / 255.0f, 206.0f / 255.0f, 250.0f / 255.0f, 1.0f};
585 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
589 return {119.0f / 255.0f, 136.0f / 255.0f, 153.0f / 255.0f, 1.0f};
593 return {176.0f / 255.0f, 196.0f / 255.0f, 222.0f / 255.0f, 1.0f};
597 return {255.0f / 255.0f, 255.0f / 255.0f, 224.0f / 255.0f, 1.0f};
601 return {0.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
605 return {50.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
609 return {250.0f / 255.0f, 240.0f / 255.0f, 230.0f / 255.0f, 1.0f};
613 return {255.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f, 1.0f};
617 return {128.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 1.0f};
621 return {102.0f / 255.0f, 205.0f / 255.0f, 170.0f / 255.0f, 1.0f};
625 return {0.0f / 255.0f, 0.0f / 255.0f, 205.0f / 255.0f, 1.0f};
629 return {186.0f / 255.0f, 85.0f / 255.0f, 211.0f / 255.0f, 1.0f};
633 return {147.0f / 255.0f, 112.0f / 255.0f, 219.0f / 255.0f, 1.0f};
637 return {60.0f / 255.0f, 179.0f / 255.0f, 113.0f / 255.0f, 1.0f};
641 return {123.0f / 255.0f, 104.0f / 255.0f, 238.0f / 255.0f, 1.0f};
645 return {0.0f / 255.0f, 250.0f / 255.0f, 154.0f / 255.0f, 1.0f};
649 return {72.0f / 255.0f, 209.0f / 255.0f, 204.0f / 255.0f, 1.0f};
653 return {199.0f / 255.0f, 21.0f / 255.0f, 133.0f / 255.0f, 1.0f};
657 return {25.0f / 255.0f, 25.0f / 255.0f, 112.0f / 255.0f, 1.0f};
661 return {245.0f / 255.0f, 255.0f / 255.0f, 250.0f / 255.0f, 1.0f};
665 return {255.0f / 255.0f, 228.0f / 255.0f, 225.0f / 255.0f, 1.0f};
669 return {255.0f / 255.0f, 228.0f / 255.0f, 181.0f / 255.0f, 1.0f};
673 return {255.0f / 255.0f, 222.0f / 255.0f, 173.0f / 255.0f, 1.0f};
677 return {0.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
681 return {253.0f / 255.0f, 245.0f / 255.0f, 230.0f / 255.0f, 1.0f};
685 return {128.0f / 255.0f, 128.0f / 255.0f, 0.0f / 255.0f, 1.0f};
689 return {107.0f / 255.0f, 142.0f / 255.0f, 35.0f / 255.0f, 1.0f};
693 return {255.0f / 255.0f, 165.0f / 255.0f, 0.0f / 255.0f, 1.0f};
697 return {255.0f / 255.0f, 69.0f / 255.0f, 0.0f / 255.0f, 1.0f};
701 return {218.0f / 255.0f, 112.0f / 255.0f, 214.0f / 255.0f, 1.0f};
705 return {238.0f / 255.0f, 232.0f / 255.0f, 170.0f / 255.0f, 1.0f};
709 return {152.0f / 255.0f, 251.0f / 255.0f, 152.0f / 255.0f, 1.0f};
713 return {175.0f / 255.0f, 238.0f / 255.0f, 238.0f / 255.0f, 1.0f};
717 return {219.0f / 255.0f, 112.0f / 255.0f, 147.0f / 255.0f, 1.0f};
721 return {255.0f / 255.0f, 239.0f / 255.0f, 213.0f / 255.0f, 1.0f};
725 return {255.0f / 255.0f, 218.0f / 255.0f, 185.0f / 255.0f, 1.0f};
729 return {205.0f / 255.0f, 133.0f / 255.0f, 63.0f / 255.0f, 1.0f};
733 return {255.0f / 255.0f, 192.0f / 255.0f, 203.0f / 255.0f, 1.0f};
737 return {221.0f / 255.0f, 160.0f / 255.0f, 221.0f / 255.0f, 1.0f};
741 return {176.0f / 255.0f, 224.0f / 255.0f, 230.0f / 255.0f, 1.0f};
745 return {128.0f / 255.0f, 0.0f / 255.0f, 128.0f / 255.0f, 1.0f};
749 return {188.0f / 255.0f, 143.0f / 255.0f, 143.0f / 255.0f, 1.0f};
753 return {65.0f / 255.0f, 105.0f / 255.0f, 225.0f / 255.0f, 1.0f};
757 return {139.0f / 255.0f, 69.0f / 255.0f, 19.0f / 255.0f, 1.0f};
761 return {250.0f / 255.0f, 128.0f / 255.0f, 114.0f / 255.0f, 1.0f};
765 return {244.0f / 255.0f, 164.0f / 255.0f, 96.0f / 255.0f, 1.0f};
769 return {46.0f / 255.0f, 139.0f / 255.0f, 87.0f / 255.0f, 1.0f};
773 return {255.0f / 255.0f, 245.0f / 255.0f, 238.0f / 255.0f, 1.0f};
777 return {160.0f / 255.0f, 82.0f / 255.0f, 45.0f / 255.0f, 1.0f};
781 return {192.0f / 255.0f, 192.0f / 255.0f, 192.0f / 255.0f, 1.0f};
785 return {135.0f / 255.0f, 206.0f / 255.0f, 235.0f / 255.0f, 1.0f};
789 return {106.0f / 255.0f, 90.0f / 255.0f, 205.0f / 255.0f, 1.0f};
793 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
797 return {112.0f / 255.0f, 128.0f / 255.0f, 144.0f / 255.0f, 1.0f};
801 return {255.0f / 255.0f, 250.0f / 255.0f, 250.0f / 255.0f, 1.0f};
805 return {0.0f / 255.0f, 255.0f / 255.0f, 127.0f / 255.0f, 1.0f};
809 return {70.0f / 255.0f, 130.0f / 255.0f, 180.0f / 255.0f, 1.0f};
813 return {210.0f / 255.0f, 180.0f / 255.0f, 140.0f / 255.0f, 1.0f};
817 return {0.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f, 1.0f};
821 return {216.0f / 255.0f, 191.0f / 255.0f, 216.0f / 255.0f, 1.0f};
825 return {255.0f / 255.0f, 99.0f / 255.0f, 71.0f / 255.0f, 1.0f};
829 return {64.0f / 255.0f, 224.0f / 255.0f, 208.0f / 255.0f, 1.0f};
833 return {238.0f / 255.0f, 130.0f / 255.0f, 238.0f / 255.0f, 1.0f};
837 return {245.0f / 255.0f, 222.0f / 255.0f, 179.0f / 255.0f, 1.0f};
841 return {245.0f / 255.0f, 245.0f / 255.0f, 245.0f / 255.0f, 1.0f};
845 return {255.0f / 255.0f, 255.0f / 255.0f, 0.0f / 255.0f, 1.0f};
849 return {154.0f / 255.0f, 205.0f / 255.0f, 50.0f / 255.0f, 1.0f};
856 static_cast<Scalar>((std::rand() % 255) / 255.0f),
857 static_cast<Scalar>((std::rand() % 255) / 255.0f),
858 static_cast<Scalar>((std::rand() % 255) / 255.0f),
899template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
904template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
910template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
915template <
class T,
class = std::enable_if_t<std::is_arithmetic_v<T>>>
static void round(SkPoint *p)
static unsigned clamp(SkFixed fx, int max)
@ kExclusion
rc = s + d - two(s*d), ra = kSrcOver
@ kSaturation
saturation of source with hue and luminosity of destination
@ kColorBurn
darken destination to reflect source
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kHue
hue of source with saturation and luminosity of destination
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kColorDodge
brighten destination to reflect source
@ kXor
r = s*(1-da) + d*(1-sa)
@ kLuminosity
luminosity of source with hue and saturation of destination
@ kSoftLight
lighten or darken, depending on source
@ kDifference
rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver
@ kOverlay
multiply or screen, depending on destination
@ kColor
hue and saturation of source with luminosity of destination
@ kHardLight
multiply or screen, depending on source
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
SK_API sk_sp< SkShader > Color(SkColor)
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()
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()
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()