35 red(std::move(a_rhs.red)),
36 green(std::move(a_rhs.green)),
37 blue(std::move(a_rhs.blue)),
38 alpha(std::move(a_rhs.alpha))
41 constexpr
Color(std::uint8_t a_red, std::uint8_t a_green, std::uint8_t a_blue, std::uint8_t a_alpha) noexcept :
48 constexpr
Color(std::uint32_t a_hexValue) noexcept :
49 red((a_hexValue >> 16) & 0xFF),
50 green((a_hexValue >> 8) & 0xFF),
51 blue((a_hexValue)&0xFF),
60 if (
this != std::addressof(a_rhs)) {
71 if (
this != std::addressof(a_rhs)) {
72 red = std::move(a_rhs.red);
73 green = std::move(a_rhs.green);
74 blue = std::move(a_rhs.blue);
75 alpha = std::move(a_rhs.alpha);
82 for (std::size_t i = 0; i <
kTotal; ++i) {
83 if (a_lhs[i] != a_rhs[i]) {
92 return !(a_lhs == a_rhs);
95 [[nodiscard]] constexpr std::uint8_t&
operator[](std::size_t a_idx) noexcept
98 return std::addressof(
red)[a_idx];
101 [[nodiscard]] constexpr
const std::uint8_t&
operator[](std::size_t a_idx)
const noexcept
104 return std::addressof(
red)[a_idx];
110 for (std::size_t i = 0; i <
kTotal; ++i) {
118 for (std::size_t i = 0; i <
kTotal; ++i) {
127 for (std::size_t i = 0; i <
kTotal; ++i) {
135 for (std::size_t i = 0; i <
kTotal; ++i) {
147 a_lhs - a_rhs.
alpha);
153 for (std::size_t i = 0; i <
kTotal; ++i) {
161 for (std::size_t i = 0; i <
kTotal; ++i) {
173 a_lhs * a_rhs.
alpha);
179 for (std::size_t i = 0; i <
kTotal; ++i) {
187 for (std::size_t i = 0; i <
kTotal; ++i) {
199 a_lhs / a_rhs.
alpha);
205 for (std::size_t i = 0; i <
kTotal; ++i) {
213 for (std::size_t i = 0; i <
kTotal; ++i) {
222 for (std::size_t i = 0; i <
kTotal; ++i) {
230 for (std::size_t i = 0; i <
kTotal; ++i) {
239 for (std::size_t i = 0; i <
kTotal; ++i) {
247 for (std::size_t i = 0; i <
kTotal; ++i) {
256 for (std::size_t i = 0; i <
kTotal; ++i) {
264 for (std::size_t i = 0; i <
kTotal; ++i) {
279 static_assert(
sizeof(
Color) == 0x4);
Definition: AbsorbEffect.h:6
string(const CharT(&)[N]) -> string< CharT, N - 1 >
std::uint8_t blue
Definition: Color.h:276
std::uint8_t red
Definition: Color.h:274
Color operator*(const Color &a_rhs) const noexcept
Definition: Color.h:150
constexpr const std::uint8_t & operator[](std::size_t a_idx) const noexcept
Definition: Color.h:101
constexpr Color(std::uint32_t a_hexValue) noexcept
Definition: Color.h:48
Color operator/(std::uint8_t a_value) const noexcept
Definition: Color.h:253
Color & operator*=(const Color &a_rhs) noexcept
Definition: Color.h:159
constexpr friend bool operator==(const Color &a_lhs, const Color &a_rhs) noexcept
Definition: Color.h:80
Color operator*(std::uint8_t a_value) const noexcept
Definition: Color.h:236
constexpr Color(std::uint8_t a_red, std::uint8_t a_green, std::uint8_t a_blue, std::uint8_t a_alpha) noexcept
Definition: Color.h:41
constexpr Color(Color &&a_rhs) noexcept
Definition: Color.h:34
friend Color operator-(std::uint8_t a_lhs, const Color &a_rhs)
Definition: Color.h:141
constexpr Color & operator=(Color &&a_rhs) noexcept
Definition: Color.h:69
std::uint8_t green
Definition: Color.h:275
Color & operator-=(const Color &a_rhs) noexcept
Definition: Color.h:133
std::string ToHex() const
friend Color operator*(std::uint8_t a_lhs, const Color &a_rhs)
Definition: Color.h:167
Color & operator+=(const Color &a_rhs) noexcept
Definition: Color.h:116
Color operator-(const Color &a_rhs) const noexcept
Definition: Color.h:124
constexpr std::uint8_t & operator[](std::size_t a_idx) noexcept
Definition: Color.h:95
constexpr Color(const Color &a_rhs) noexcept
Definition: Color.h:27
Color(const NiColor &a_rhs)
~Color() noexcept=default
Color operator+(const Color &a_rhs) const noexcept
Definition: Color.h:107
Color & operator*=(std::uint8_t a_value) noexcept
Definition: Color.h:245
Color & operator-=(std::uint8_t a_value) noexcept
Definition: Color.h:228
Color & operator/=(std::uint8_t a_value) noexcept
Definition: Color.h:262
Color operator-(std::uint8_t a_value) const noexcept
Definition: Color.h:219
std::uint32_t ToInt() const
Color operator+(std::uint8_t a_value) const noexcept
Definition: Color.h:202
constexpr friend bool operator!=(const Color &a_lhs, const Color &a_rhs) noexcept
Definition: Color.h:90
Color operator/(const Color &a_rhs) const noexcept
Definition: Color.h:176
constexpr Color() noexcept
Definition: Color.h:20
std::uint8_t alpha
Definition: Color.h:277
friend Color operator/(std::uint8_t a_lhs, const Color &a_rhs)
Definition: Color.h:193
Color & operator+=(std::uint8_t a_value) noexcept
Definition: Color.h:211
Color & operator/=(const Color &a_rhs) noexcept
Definition: Color.h:185
@ kBlue
Definition: Color.h:14
@ kTotal
Definition: Color.h:17
@ kRed
Definition: Color.h:12
@ kGreen
Definition: Color.h:13
@ kAlpha
Definition: Color.h:15