3#include <SFML/Graphics/Color.hpp>
17 constexpr Color() =
default;
18 constexpr Color(std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha = 255u) :
19 r(red), g(green), b(blue), a(alpha) {}
21 operator sf::Color()
const {
return { r, g, b, a }; }
23 static constexpr Color red() {
return { 255u,0u,0u,255u }; }
24 static constexpr Color green() {
return { 0u,255u,0u,255u }; }
25 static constexpr Color blue() {
return { 0u,0u,255u,255u }; }
26 static constexpr Color yellow() {
return { 255u,255u,0u,255u }; }
27 static constexpr Color black() {
return { 0u,0u,0u,255u }; }
28 static constexpr Color white() {
return { 255u,255u,255u,255u }; }
29 static constexpr Color magenta() {
return { 255u,0u,255u,255u }; }
30 static constexpr Color cyan() {
return { 0u,255u,255u,255u }; }
31 static constexpr Color transparent() {
return { 0u,0u,0u,0u }; }
Color is a struct defining an RGBA color with 4 bytes.
Definition: color.h:12