From d1d9dec40234b81ec4ec79da43d4eb36cb1e31cf Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 12 Jan 2026 07:55:05 +0100 Subject: [PATCH] Fix gamma correction for color not enabled on fresh install (#5225) Co-authored-by: DedeHai <6280424+DedeHai@users.noreply.github.com> --- wled00/cfg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 28b63ea6..ff491faf 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -507,8 +507,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(strip.autoSegments, light[F("aseg")]); CJSON(gammaCorrectVal, light["gc"]["val"]); // default 2.2 - float light_gc_bri = light["gc"]["bri"]; - float light_gc_col = light["gc"]["col"]; + float light_gc_bri = light["gc"]["bri"] | 1.0f; // default to 1.0 (false) + float light_gc_col = light["gc"]["col"] | gammaCorrectVal; // default to gammaCorrectVal (true) if (light_gc_bri > 1.0f) gammaCorrectBri = true; else gammaCorrectBri = false; if (light_gc_col > 1.0f) gammaCorrectCol = true;