diff --git a/RGBWWLedColor.cpp b/RGBWWLedColor.cpp index cbdc5c4..68208b2 100644 --- a/RGBWWLedColor.cpp +++ b/RGBWWLedColor.cpp @@ -156,7 +156,7 @@ void RGBWWColorUtils::getHSVcorrection(float& red, float& yellow, float& green, int wwfactor = ((_ColdWhiteKelvin - rgbw.ct) * RGBWW_CALC_MAXVAL) / (_ColdWhiteKelvin - _WarmWhiteKelvin); //balance between CW and WW Leds output.warmwhite = (rgbw.w * wwfactor) /RGBWW_CALC_MAXVAL; - output.coldwhite = (rgbw.w * (1 - wwfactor)) / RGBWW_CALC_MAXVAL; + output.coldwhite = rgbw.w - output.warmwhite; } else { // if kelvin outside range - different calculation algorithm // for now we asume a "neutral white" (0.5 CW, 0.5 WW)