CanvasModulate tints unpredictably

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jarlowrey

I have a black CanvasModulate and am using white Light2D’s to illuminate the scene. My entities are composed of sprites and ProgressBars (health bars). Even with 100 Light2D Energy, the Green Progress bars appear Yellow, while the sprites are normal (if a little bit dimmed).

How can I fix the ProgressBar tint, while still ensuring they are hidden if not illuminated?

Example below. The Progress bar RGB is set to (0,255,0), but appears yellow due to modulation/lighting.

enter image description here

Edit: If I switch the light mode to Mix or Mask I do not have this issue, but new issues are created with overlapping lights. Mix mode creates an effect like this:

enter image description here

While Mask makes the entire background visible at once.

Edit: It’s not a bug, it’s a feature. I made the player’s lights Mix and everything else Add. This makes the correct colors appear when close to the player, otherwise they can be a bit off (like the yellow bar). It’s not what I wanted originally, but it’s a good look and will keep until someone can help solve the original problem.

:bust_in_silhouette: Reply From: jarlowrey

Using mix mode was correct. The issue was my light texture was not completely white. I made it with a black/white gradient, and when mixing with other lights the black was apparent. Recreating the light without a black gradient in an image editor fixed the issue.