blink1-lib  1.0.0
RGB.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <cstdint>
9 #include <ostream>
10 
11 namespace blink1_lib {
12 
16  struct RGB {
17 
21  std::uint8_t r{0};
22 
26  std::uint8_t g{0};
27 
31  std::uint8_t b{0};
32 
38  RGB(const std::uint8_t r, const std::uint8_t g, const std::uint8_t b) noexcept;
39 
45  RGB() noexcept = default;
46 
53  [[nodiscard]] bool operator==(const RGB& other) const noexcept;
54 
61  [[nodiscard]] bool operator!=(const RGB& other) const noexcept;
62 
69  friend std::ostream& operator<<(std::ostream& os, const RGB& rgb);
70  };
71 }
blink1_lib::RGB::r
std::uint8_t r
Definition: RGB.hpp:21
blink1_lib
Definition: Blink1Device.hpp:19
blink1_lib::RGB::b
std::uint8_t b
Definition: RGB.hpp:31
blink1_lib::RGB
Definition: RGB.hpp:16
blink1_lib::RGB::g
std::uint8_t g
Definition: RGB.hpp:26
blink1_lib::RGB::RGB
RGB() noexcept=default