From 1d686d7807f7550bae74cc682d3bbdb58290ad1a Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:49:53 +0100 Subject: [PATCH] leds 2D preview: better color accuracy * replace "jumpy" color enhancement with a smooth function * slightly increase size of preview pixels --- wled00/data/peek.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wled00/data/peek.js b/wled00/data/peek.js index 24ee7ee7..7578bcf6 100644 --- a/wled00/data/peek.js +++ b/wled00/data/peek.js @@ -30,13 +30,15 @@ function peek(c) { ctx.clearRect(0, 0, c.width, c.height); //WLEDMM function colorAmp(color) { if (color == 0) return 0; - return 25+225*color/255; + //return color; // no enhancement + //return 25+225*color/255; // legacy WLEDMM. problem: strong jump from 0 to 25 -> wrong colors + return Math.sqrt(color/255) * 255; // Square root provides gentle and jump-free enhancement of lower brightness pixels } //WLEDMM in range 55 - 205 for (y=0.5;y 0.45 ctx.fill(); } i+=3;