How to change Light2D's darkness color?

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

Ok. So I have a regular Light2D on my scene. There are parts of the scene that are not lit up by the light and as a result are showered in darkness. This darkness, obviously, is black. I’m wondering if there’s any way in which I can make this darkness a different color.

Hopefully I’m explaining myself correctly.

You can use a shader to replace the black with a different color.

exuin | 2021-09-27 16:13

I’m not very familiar with shaders. Could you elaborate a bit more on how I would go around doing this?

gerardob | 2021-09-27 18:12

:bust_in_silhouette: Reply From: SF123

As it says in the Documentation:

Light is defined by a (usually grayscale) texture, a color, an energy
value, a mode (see constants), and various other parameters (range and

so you should be able to control it by just changing the color in the editor.

But that changes the color of the light, not the color of the parts that are not lit, which remain black.

gerardob | 2021-09-28 04:17