60 constexpr Color(std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha = 255);
68 constexpr explicit Color(std::uint32_t color);
76 [[nodiscard]]
constexpr std::uint32_t
toInteger()
const;
229#include <SFML/Graphics/Color.inl>
static const Color Red
Red predefined color.
Definition Color.hpp:84
constexpr Color operator-(Color left, Color right)
Overload of the binary - operator.
constexpr Color(std::uint32_t color)
Construct the color from 32-bit unsigned integer.
constexpr Color & operator-=(Color &left, Color right)
Overload of the binary -= operator.
static const Color White
White predefined color.
Definition Color.hpp:83
constexpr Color operator*(Color left, Color right)
Overload of the binary * operator.
static const Color Transparent
Transparent (black) predefined color.
Definition Color.hpp:90
constexpr Color(std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha=255)
Construct the color from its 4 RGBA components.
std::uint8_t a
Alpha (opacity) component.
Definition Color.hpp:99
static const Color Cyan
Cyan predefined color.
Definition Color.hpp:89
std::uint8_t b
Blue component.
Definition Color.hpp:98
static const Color Magenta
Magenta predefined color.
Definition Color.hpp:88
constexpr Color & operator+=(Color &left, Color right)
Overload of the binary += operator.
static const Color Black
Black predefined color.
Definition Color.hpp:82
constexpr bool operator!=(Color left, Color right)
Overload of the != operator.
constexpr Color operator+(Color left, Color right)
Overload of the binary + operator.
constexpr bool operator==(Color left, Color right)
Overload of the == operator.
static const Color Green
Green predefined color.
Definition Color.hpp:85
std::uint8_t g
Green component.
Definition Color.hpp:97
static const Color Blue
Blue predefined color.
Definition Color.hpp:86
constexpr Color()=default
Default constructor.
constexpr Color & operator*=(Color &left, Color right)
Overload of the binary *= operator.
std::uint8_t r
Red component.
Definition Color.hpp:96
constexpr std::uint32_t toInteger() const
Retrieve the color as a 32-bit unsigned integer.
static const Color Yellow
Yellow predefined color.
Definition Color.hpp:87
Definition BlendMode.hpp:34