Changing the render background color (SOLVED)

Hi there,

Can you change the default color of the background of the game?

Thanks in advance,

K

2 Likes

Aaaaand found it :slight_smile:

clear_color
Set render clear color. This is the color that appears on the screen where nothing is rendered, i.e. background.

FIELDS
color color to use as clear color
EXAMPLES

msg.post("@render:", "clear_color", { color = vmath.vector4(1, 0, 0, 0) } )
14 Likes

Just in case anyone else copies and pastes this code and gets an error because of the formatting of the quotes, here is a “clean” version! :smiley:

msg.post("@render:", "clear_color", { color = vmath.vector4(1, 0, 0, 0) } )
12 Likes

There is also a setting your can change directly in game.project file:

bild

4 Likes

Welcome to the dark world of the render script.

2 Likes

found this handy tool for converting hex to rgb, enjoy!

https://www.rapidtables.com/convert/color/hex-to-rgb.html