@ -91,8 +91,8 @@ void WS2812B_SetDiodeHSV(int16_t diode_id, uint16_t Hue, uint8_t Saturation, uin
Sector = Hue / 60; // Sector 0 to 5
Fracts = Hue % 60;
p = (Brightness * (255 - Saturation)) / 256;
q = (Brightness * (255 - (Saturation * Fracts)/360)) / 256;
t = (Brightness * (255 - (Saturation * (360 - Fracts))/360)) / 256;
q = (Brightness * (255 - (Saturation * Fracts)/60)) / 256;
t = (Brightness * (255 - (Saturation * (59 - Fracts))/60)) / 256;
switch(Sector)
@ -625,8 +625,8 @@ void WS2812BFX_HSVtoRGB(uint16_t h, uint8_t s, uint8_t v, uint8_t *r, uint8_t *g
Sector = h / 60; // Sector 0 to 5
Fracts = h % 60;
p = (v * (255 - s)) / 256;
q = (v * (255 - (s * Fracts)/360)) / 256;
t = (v * (255 - (s * (360 - Fracts))/360)) / 256;
q = (v * (255 - (s * Fracts)/60)) / 256;
t = (v * (255 - (s * (59 - Fracts))/60)) / 256;