Set Directional Light Color
Changes the color of the directional light shining on the terrain.

Description
The Set Directional Light Color block changes the color of the directional light shining on the terrain. This is a code block part of the Environment drawer.
Usage
Use Set Directional Light Color to adjust the ambient lighting in your simulation. This block is perfect for creating time-of-day effects like sunrise and sunset, simulating different weather conditions, or establishing specific moods and atmospheres in your environment.
Syntax
Input:
- Color block
Example
This is a model of a forest environment. To make the lighting more realistic, the color of the directional light changes from white to be gradually more pink (the green value of its RGB is lowered) during the sunset and gradually less pink during sunrise.



Notes
- The directional light affects all objects and terrain in the simulation
- Color changes take effect immediately when the block is executed
- Combine with Set Directional Light Intensity for more complex lighting effects
Related Blocks
- Set Directional Light Intensity - Adjusts the brightness of the directional light
- Color RGB - Creates a color from RGB values
- Color - Returns a color value