7 bwColor(
float red,
float green,
float blue,
float alpha = 1.0f);
8 bwColor(
float rgb,
float alpha = 1.0f);
9 bwColor(
unsigned int red,
unsigned int green,
unsigned int blue,
unsigned int alpha = 255);
10 bwColor(
unsigned int rgb,
unsigned int alpha = 255);
15 auto shade(
float rgb_shade,
float alpha_shade = 0.0f) ->
bwColor&;
16 auto shade(
unsigned int rgb_shade,
unsigned int alpha_shade = 0.0f) ->
bwColor&;
18 void setColor(
float red,
float green,
float blue,
float alpha = 1.0f);
19 void setColor(
float rgb,
float alpha = 1.0f);
21 auto getColor() const -> const
float*;
22 auto operator=(const
float* rgb) ->
bwColor&;
25 auto operator==(const
bwColor& compare_color) const ->
bool;
26 auto operator[](const
int index) ->
float&;
28 operator const
float*() const;
31 enum class Component {
38 auto operator[](
const Component component) ->
float&
40 return rgba[
static_cast<int>(component)];
43 void clamp(
const Component component);
45 float rgba[4]{0, 0, 0, 1};