28 #ifndef DOXYGEN_SHOULD_SKIP_THIS 53 static constexpr Color4f
Black{0.0f, 0.0f, 0.0f, 1.0f};
58 static constexpr Color4f
White{1.0f, 1.0f, 1.0f, 1.0f};
63 static constexpr Color4f
Red{1.0f, 0.0f, 0.0f, 1.0f};
68 static constexpr Color4f
Green{0.0f, 1.0f, 0.0f, 1.0f};
73 static constexpr Color4f
Blue{0.0f, 0.0f, 1.0f, 1.0f};
78 static constexpr Color4f
Cyan{0.0f, 1.0f, 1.0f, 1.0f};
83 static constexpr Color4f
Magenta{1.0f, 0.0f, 1.0f, 1.0f};
88 static constexpr Color4f
Yellow{1.0f, 1.0f, 0.0f, 1.0f};
100 static constexpr Color4f
Opaque(
float value = 0.5f) {
101 return { 1.0f, 1.0f, 1.0f, value };
109 static constexpr Color4f
Gray(
float value = 0.5f) {
110 return { value, value, value, 1.0f };
116 static constexpr Color4f
Orange{1.0f, 0.5f, 0.0f, 1.0f};
121 static constexpr Color4f
Rose{1.0f, 0.0f, 0.5f, 1.0f};
131 static constexpr Color4f
Spring{0.0f, 1.0f, 0.5f, 1.0f};
136 static constexpr Color4f
Violet{0.5f, 0.0f, 1.0f, 1.0f};
141 static constexpr Color4f
Azure{0.0f, 0.5f, 1.0f, 1.0f};
154 static Color4f
lighter(Color4f color,
float percent = 0.5f);
166 static Color4f
darker(Color4f color,
float percent = 0.5f);
177 static Color4f
fromRgba32(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255);
201 static Color4u
toRgba32(Color4f color);
205 #ifndef DOXYGEN_SHOULD_SKIP_THIS static Color4f fromRgba32(Color4u color)
Get a color from a 32-bit color.
static constexpr Color4f Azure
Azure predefined color.
Definition: Color.h:141
Color()=delete
Deleted constructor.
static constexpr Color4f Transparent
Transparent (black) predefined color.
Definition: Color.h:93
static Color4f fromRgba32(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Get a color from 4 8-bit channels.
static constexpr Color4f Magenta
Magenta predefined color.
Definition: Color.h:83
static Color4f lighter(Color4f color, float percent=0.5f)
Compute a lighter color.
static constexpr Color4f Chartreuse
Chartreuse predefined color.
Definition: Color.h:126
static constexpr Color4f White
White predefined color.
Definition: Color.h:58
static constexpr Color4f Violet
Violet predefined color.
Definition: Color.h:136
static constexpr Color4f Cyan
Cyan predefined color.
Definition: Color.h:78
static Color4f fromRgba32(uint32_t color)
Get a color from 32-bit value.
static constexpr Color4f Red
Red predefined color.
Definition: Color.h:63
static constexpr Color4f Yellow
Yellow predefined color.
Definition: Color.h:88
static Color4u toRgba32(Color4f color)
Convert a color to a 32-bit color.
static constexpr Color4f Gray(float value=0.5f)
Gray predefined color.
Definition: Color.h:109
The namespace for gf classes.
Definition: Action.h:34
Predefined colors.
Definition: Color.h:44
static constexpr Color4f Rose
Rose predefined color.
Definition: Color.h:121
static constexpr Color4f Green
Green predefined color.
Definition: Color.h:68
static constexpr Color4f Black
Black predefined color.
Definition: Color.h:53
static constexpr Color4f Opaque(float value=0.5f)
Opaque predefined color.
Definition: Color.h:100
static constexpr Color4f Spring
Spring (green) predefined color.
Definition: Color.h:131
static constexpr Color4f Blue
Blue predefined color.
Definition: Color.h:73
static Color4f darker(Color4f color, float percent=0.5f)
Compute a darker color.
#define GF_API
Definition: Portability.h:35
static constexpr Color4f Orange
Orange predefined color.
Definition: Color.h:116