Skip to content

Commit 83753a5

Browse files
committed
Fixed no gamma correction for JSON individual LED control
1 parent 3161f5f commit 83753a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wled00/json.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,11 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
203203

204204
if (set < 2) stop = start + 1;
205205
for (uint16_t i = start; i < stop; i++) {
206-
strip.setPixelColor(i, rgbw[0], rgbw[1], rgbw[2], rgbw[3]);
206+
if (strip.gammaCorrectCol) {
207+
strip.setPixelColor(i, strip.gamma8(rgbw[0]), strip.gamma8(rgbw[1]), strip.gamma8(rgbw[2]), strip.gamma8(rgbw[3]));
208+
} else {
209+
strip.setPixelColor(i, rgbw[0], rgbw[1], rgbw[2], rgbw[3]);
210+
}
207211
}
208212
if (!set) start++;
209213
set = 0;

0 commit comments

Comments
 (0)