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.
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.
constexpr Color operator*(Color left, Color right)
Overload of the binary operator*
static const Color Transparent
Transparent (black) predefined color.
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.
static const Color Cyan
Cyan predefined color.
std::uint8_t b
Blue component.
static const Color Magenta
Magenta predefined color.
constexpr Color & operator+=(Color &left, Color right)
Overload of the binary operator+=
static const Color Black
Black predefined color.
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.
std::uint8_t g
Green component.
static const Color Blue
Blue predefined color.
constexpr Color()=default
Default constructor.
constexpr Color & operator*=(Color &left, Color right)
Overload of the binary operator*=
std::uint8_t r
Red component.
constexpr std::uint32_t toInteger() const
Retrieve the color as a 32-bit unsigned integer.
static const Color Yellow
Yellow predefined color.