You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't answer that but gamma is supposed to be applied only as a last step in image manipulation. And now it is. In the past Gamma was applied immediately when color was selected and every calculation worked on gamma modified color.
Well I believe it doesn't really matter when you convert between color spaces, but you need to make sure that the math you are using is the correct one that is applicable for each color space. If you simply move the conversion to a different place, but don't replace all math that happens in between, I can see how that would produce different results.
sRGB is an exponential color space, so you can't do linear math in it (despite the fact that most people do anyway). I would assume that the RGB colors of WLED are sRGB, are they not? And further I would assume (without knowing much about it), that LEDs are addressed in a linear color space. With these assumptions I would arrive at the conclusion that the gamma correction would have to be done as early as possible. Again, that is without ever having looked at color spaces in the context of LEDs.
In any case, if you look at the picture, you will notice that there is no hint of mixed colors, just pure red, green and blue, in varying intensities. I don't think that can be a correct result when your input is yellow, cyan or magenta.
what are you settings for color correction? needs to be "Use Gamma correction for color" enabled and set to 2.2 to get the best match to the old looks. it will still look different at very low brightness but I see no black bands at 4 only below that.
I do agree that at low brightness it might need some tuning as we are running into a resolution problem and it really does not look good below a brightness of 10.
The base issue is this: calling SetLuminance() in NPB will dim colors all the way to zero.
To solve it, this function of NPB can not be used and colors need to be scaled before passing them to NPB.
WLED does not operate in any color space. It uses linear math and gamma is used to correct for human vision. I.e. a channel value of 127 is considered 50% of brightness.
what are you settings for color correction? needs to be "Use Gamma correction for color" enabled and set to 2.2 to get the best match to the old looks. it will still look different at very low brightness but I see no black bands at 4 only below that.
Color correction on, brightness correction off (whatever that means). gamma was at 2.8, I assume that is or used to be the default.
Indeed 2.2 works a bit better, but the brightness and colors still look inconsistent, and I still get black bands at brightness 3 or lower.
4a3af81 with gamma 2.8 has no black bands at brightness 1, and reasonable colors at least from brightness 3 upwards (3 colors at brightness 1, 6 colors at brightness 2 with the default palette). Same with gamma 2.2.
4a3af81 with gamma 2.8 has no black bands at brightness 1, and reasonable colors at least from brightness 3 upwards (3 colors at brightness 1, 6 colors at brightness 2 with the default palette). Same with gamma 2.2.
the black bands are fixable, the rest is a question of personal preference.
Activity
blazoncek commentedon Jul 29, 2025
Due to new way gamma is handled (which is now correctly applied as a last step).
TripleWhy commentedon Jul 29, 2025
So you are saying this is the correct behavior?
(and everyone who likes colors should simply turn off gamma correction? ^^)
blazoncek commentedon Jul 29, 2025
I can't answer that but gamma is supposed to be applied only as a last step in image manipulation. And now it is. In the past Gamma was applied immediately when color was selected and every calculation worked on gamma modified color.
TripleWhy commentedon Jul 29, 2025
Well I believe it doesn't really matter when you convert between color spaces, but you need to make sure that the math you are using is the correct one that is applicable for each color space. If you simply move the conversion to a different place, but don't replace all math that happens in between, I can see how that would produce different results.
sRGB is an exponential color space, so you can't do linear math in it (despite the fact that most people do anyway). I would assume that the RGB colors of WLED are sRGB, are they not? And further I would assume (without knowing much about it), that LEDs are addressed in a linear color space. With these assumptions I would arrive at the conclusion that the gamma correction would have to be done as early as possible. Again, that is without ever having looked at color spaces in the context of LEDs.
In any case, if you look at the picture, you will notice that there is no hint of mixed colors, just pure red, green and blue, in varying intensities. I don't think that can be a correct result when your input is yellow, cyan or magenta.
DedeHai commentedon Jul 29, 2025
can't reproduce: fixed in #4711
edit:
thanks for making me check, I found a different bug :)
TripleWhy commentedon Jul 29, 2025
As said, I noticed this in the main branch, which contains 4711. Anyway I checked out 00eb406 (4711), and b76ef23 (your fix from today). Same problem.
DedeHai commentedon Jul 30, 2025
what are you settings for color correction? needs to be "Use Gamma correction for color" enabled and set to 2.2 to get the best match to the old looks. it will still look different at very low brightness but I see no black bands at 4 only below that.
I do agree that at low brightness it might need some tuning as we are running into a resolution problem and it really does not look good below a brightness of 10.
DedeHai commentedon Jul 30, 2025
The base issue is this: calling SetLuminance() in NPB will dim colors all the way to zero.
To solve it, this function of NPB can not be used and colors need to be scaled before passing them to NPB.
blazoncek commentedon Jul 30, 2025
WLED does not operate in any color space. It uses linear math and gamma is used to correct for human vision. I.e. a channel value of 127 is considered 50% of brightness.
TripleWhy commentedon Jul 30, 2025
Color correction on, brightness correction off (whatever that means). gamma was at 2.8, I assume that is or used to be the default.
Indeed 2.2 works a bit better, but the brightness and colors still look inconsistent, and I still get black bands at brightness 3 or lower.
4a3af81 with gamma 2.8 has no black bands at brightness 1, and reasonable colors at least from brightness 3 upwards (3 colors at brightness 1, 6 colors at brightness 2 with the default palette). Same with gamma 2.2.
DedeHai commentedon Jul 30, 2025
the black bands are fixable, the rest is a question of personal preference.
TripleWhy commentedon Jul 30, 2025
I don't think yellow looking like dark red/black/dark green personal preference, but that's just my opinion, I guess
DedeHai commentedon Jul 30, 2025
I meant in general. this is an edge case.
DedeHai commentedon Jul 31, 2025
@TripleWhy I made a proof of concept: #4798