Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Use sRGB transfer function instead of plain gamma (better accuracy for lower brightness)

Aperta
#5,707 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
cpp
Ambito
embedded-iot

Direzione di ricerca

Start by locating the gamma and inverse-gamma LUT calculations; the issue does not name files or tests. Read the linked sRGB transfer-function equations and determine how they apply to the project's gamma values. Done means both LUT calculations use corresponding sRGB functions and low-brightness transitions are smoother.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

discussion enhancement

It seems that sRGB has a better way for preserving low-brightness colors, compared to "plain" gamma correction.

As the gamma (and inverse gamma) LUT calculation is not in any hot path, we should try if the sRGB pedant holds its promise to provide smoother transitions at low brightness.

https://en.wikipedia.org/wiki/SRGB#Transfer_function_(%22gamma%22)

The math looks easy, by just replacing the "pow()" expression with the sRGB transfer function.
It's important to also adjust the inverse correction to use the inverse sRGB transfer function.

Edit: the sRGB transfer function uses a gamma exponent of 2.4, the resulting curve approximates a gamma=2.2 curve. I thinks it's possible to derive the correct scaling and offset coefficients for other gamma values - the wikipedia article shows the basic equations needed.

Lingua principale
C++
Stelle
18.8k
Fork
4.4k
Merge medio
4g 6h
PR unite (30g)
12

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wled/WLED

Tutte le issue di wled/WLED

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.