Remove gamma value lower limit to enable inverse gamma correction (#5187)

* Enable inverse gamma correction (gamma < 1.0)

Allow gamma values from 0.1 to 3.0 instead of restricting to > 1.0.
This enables inverse gamma curves for use cases requiring brightened
mid-tones and compressed highlights.

Changes:
- Update backend validation in set.cpp and cfg.cpp to accept 0.1-3.0
- Update HTML form min value from 1 to 0.1

Co-authored-by: Flo <flo@Mac.lan>
Co-authored-by: Damian Schneider <daedae@gmx.ch>
This commit is contained in:
flo269
2026-02-08 17:53:54 +01:00
committed by GitHub
parent 80e75139c6
commit 7387baace4
3 changed files with 7 additions and 7 deletions

View File

@@ -378,7 +378,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
gammaCorrectBri = request->hasArg(F("GB"));
gammaCorrectCol = request->hasArg(F("GC"));
gammaCorrectVal = request->arg(F("GV")).toFloat();
if (gammaCorrectVal <= 1.0f || gammaCorrectVal > 3) {
if (gammaCorrectVal < 0.1f || gammaCorrectVal > 3) {
gammaCorrectVal = 1.0f; // no gamma correction
gammaCorrectBri = false;
gammaCorrectCol = false;