Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gamma correction for custom palettes not applied #126

@RomRider

Description

@RomRider

What happened?

When using custom palettes (paletteX.json), there is no gamma correction applied to it. It needs to be done manually in the palette itself using the static gamma conversion table from WLED.

Same issue was happening in upstream (see wled#3399).

To Reproduce Bug

Upload custom palette with a single color on both ends
Apply the palette
See that the color isn't the same as when using static and the same RGB value.

Expected Behavior

Custom palette should be gamma corrected.

Install Method

From MoonModules Release Page

What version/release of MM WLED?

WLEDMM_0.14.1-b30.36_esp32_4MB_M.bin

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

I should be able to use the uncorrected palette below directly as it is the palette I'm using on other projetcs not using WLED but using the same gamma correction table. The manually gamma corrected one is in the palette object.

{"palette":[
  0,198,1,11,
  42,241,0,148,
  84,3,0,255,
  126,0,215,247,
  168,3,0,255,
  210,241,0,148,
  255,198,1,11
],
"uncorrected":[
  0,233,28,84,
  42,250,2,210,
  84,50,2,255,
  126,22,240,252,
  168,50,2,255,
  210,250,2,210,
  255,233,28,84
]
}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions