12 template<ColorComponent T>
22 static constexpr Rgb white() {
return {1.f, 1.f, 1.f }; }
29 static constexpr Rgb black() {
return {0.f, 0.f, 0.f }; }
31 static constexpr Rgb red() {
return {1.f, 0.f, 0.f }; }
33 static constexpr Rgb green() {
return {0.f, 1.f, 0.f }; }
36 static constexpr Rgb blue() {
return {0.f, 0.f, 1.f }; }
37 static constexpr Rgb cyan() {
return {0.f, 1.f, 1.f }; }
38 static constexpr Rgb magenta() {
return {1.f, 0.f, 1.f }; }
40 static constexpr Rgb yellow() {
return {1.f, 1.f, 0.f }; }
41 static constexpr Rgb orange() {
return {1.f, 0.65f, 0.f }; }
42 static constexpr Rgb purple() {
return {0.75f, 0.33f, 0.93f}; }
52 template<ColorComponent U>
53 requires std::constructible_from<T, const U&>
60 template<ColorComponent U>
61 requires std::constructible_from<T, const U&>
62 explicit (
not (std::convertible_to<U, T>))
64 r{
static_cast<T>(
v.r)},
65 g{
static_cast<T>(
v.g)},
66 b{
static_cast<T>(
v.b)}
72 constexpr size_t size()
const {
return 3; }
87 template<
size_t I,
typename T>
90 template<
size_t I,
typename T>
93 template<
size_t I,
typename T>
96 template<
size_t I,
typename T>
100template<osc::ColorComponent T>
101struct std::tuple_size<
osc::Rgb<T>> {
102 static inline constexpr size_t value = 3;
105template<
size_t I, osc::ColorComponent T>
106struct std::tuple_element<I,
osc::Rgb<T>> {
Definition custom_decoration_generator.h:5
constexpr const T & get(const Rgb< T > &v)
Definition rgb.h:88
constexpr U to(T &&value)
Definition conversion.h:56
friend bool operator==(const Rgb &, const Rgb &)=default
static constexpr Rgb muted_yellow()
Definition rgb.h:39
static constexpr Rgb dark_grey()
Definition rgb.h:26
value_type r
Definition rgb.h:82
constexpr Rgb(value_type r_, value_type g_, value_type b_)
Definition rgb.h:48
constexpr Rgb(const Vector< value_type, 3 > &v)
Definition rgb.h:50
static constexpr Rgb muted_green()
Definition rgb.h:32
static constexpr Rgb muted_blue()
Definition rgb.h:35
static constexpr Rgb magenta()
Definition rgb.h:38
value_type g
Definition rgb.h:83
constexpr Rgb(const Vector< U, 3 > &v)
Definition rgb.h:54
static constexpr Rgb yellow()
Definition rgb.h:40
value_type & reference
Definition rgb.h:16
static constexpr Rgb blue()
Definition rgb.h:36
value_type b
Definition rgb.h:84
static constexpr Rgb black()
Definition rgb.h:29
value_type * iterator
Definition rgb.h:19
constexpr iterator end()
Definition rgb.h:77
static constexpr Rgb muted_red()
Definition rgb.h:30
constexpr Rgb(value_type v)
Definition rgb.h:46
static constexpr Rgb red()
Definition rgb.h:31
static constexpr Rgb lightest_grey()
Definition rgb.h:23
static constexpr Rgb orange()
Definition rgb.h:41
static constexpr Rgb darkest_grey()
Definition rgb.h:28
static constexpr Rgb purple()
Definition rgb.h:42
constexpr const_iterator begin() const
Definition rgb.h:75
size_t size_type
Definition rgb.h:18
constexpr const_iterator end() const
Definition rgb.h:78
static constexpr Rgb cyan()
Definition rgb.h:37
static constexpr Rgb lighter_grey()
Definition rgb.h:24
const value_type * const_iterator
Definition rgb.h:20
constexpr reference operator[](size_type pos)
Definition rgb.h:69
const value_type & const_reference
Definition rgb.h:17
constexpr iterator begin()
Definition rgb.h:74
constexpr size_t size() const
Definition rgb.h:72
static constexpr Rgb darker_grey()
Definition rgb.h:27
T value_type
Definition rgb.h:15
not(std::convertible_to< U, T >)) const expr Rgb(const Rgb< U > &v)
Definition rgb.h:62
constexpr const_reference operator[](size_type pos) const
Definition rgb.h:70
static constexpr Rgb white()
Definition rgb.h:22
static constexpr Rgb green()
Definition rgb.h:33
static constexpr Rgb light_grey()
Definition rgb.h:25
static constexpr Rgb dark_green()
Definition rgb.h:34
T type
Definition rgb.h:107