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