Definition at line 121 of file hsv16.cpp.hpp.
121 {
122
126
127 if (s == 0) {
128
130 return CRGB{gray, gray, gray};
131 }
132
133
134 u32 sector = (h * 6) / 65536;
135 u32 sector_pos = (h * 6) % 65536;
136
137
138
140
141
143 if (sector & 1) {
144
145
147 } else {
148
149
151 }
152
153 u32 m = v - c;
154
155 u32 r1, g1, b1;
156 switch (sector) {
157 case 0: r1 = c; g1 =
x; b1 = 0;
break;
158 case 1: r1 =
x; g1 = c; b1 = 0;
break;
159 case 2: r1 = 0; g1 = c; b1 =
x;
break;
160 case 3: r1 = 0; g1 =
x; b1 = c;
break;
161 case 4: r1 =
x; g1 = 0; b1 = c;
break;
162 default: r1 = c; g1 = 0; b1 =
x;
break;
163 }
164
165
169
170 return CRGB{R, G,
B};
171}
u16 map32_to_16(u32 x) FL_NOEXCEPT
u8 map16_to_8(u16 x) FL_NOEXCEPT
FL_DISABLE_WARNING_PUSH unsigned char * B
Representation of an 8-bit RGB pixel (Red, Green, Blue)
References B, fl::HSV16::h, map16_to_8(), map32_to_16(), fl::HSV16::s, fl::HSV16::v, and x.
Referenced by fl::HSV16::ToRGB().