From 8650372893955ac77a6dd63acf061559536a9f21 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Tue, 3 Feb 2026 22:14:45 +0100 Subject: [PATCH 1/2] apply inverse gamma to segment brightness for better color preservation --- wled00/FX_fcn.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index f9065446ba..479f0bed42 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1384,6 +1384,7 @@ void WS2812FX::blendSegment(const Segment &topSegment) const { const unsigned progInv = 0xFFFFU - progress; uint8_t opacity = topSegment.currentBri(); // returns transitioned opacity for style FADE uint8_t cct = topSegment.currentCCT(); + if (gammaCorrectCol) opacity = gamma8inv(opacity); // use inverse gamma on brightness for correct color scaling after gamma correction Segment::setClippingRect(0, 0); // disable clipping by default From 6a704550cf413f11f927f8d996afa8e08e195649 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Tue, 3 Feb 2026 22:35:25 +0100 Subject: [PATCH 2/2] add PR reference --- wled00/FX_fcn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 479f0bed42..fa891a6d84 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1384,7 +1384,7 @@ void WS2812FX::blendSegment(const Segment &topSegment) const { const unsigned progInv = 0xFFFFU - progress; uint8_t opacity = topSegment.currentBri(); // returns transitioned opacity for style FADE uint8_t cct = topSegment.currentCCT(); - if (gammaCorrectCol) opacity = gamma8inv(opacity); // use inverse gamma on brightness for correct color scaling after gamma correction + if (gammaCorrectCol) opacity = gamma8inv(opacity); // use inverse gamma on brightness for correct color scaling after gamma correction (see #5343 for details) Segment::setClippingRect(0, 0); // disable clipping by default