Can i set the window background color at runtime?

@canslp This is a workaround, try using it :smiley:

Edit :

  1. I have now edited it to only update when size_changed signal is called.
  2. Set minimum window size to size specified in Project Settings

BTW settings
settings

extends Node2D
var size = Vector2i(ProjectSettings.get_setting("display/window/size/viewport_width"),ProjectSettings.get_setting("display/window/size/viewport_height"))

func _ready():
	RenderingServer.set_default_clear_color(Color.SKY_BLUE)
	DisplayServer.window_set_min_size(size)
	get_viewport().size_changed.connect(update_position)

func update_position():
	var a = DisplayServer.window_get_size()
	position.x = (a.x -size.x)/2
	position.y = (a.y -size.y)/2

Working example