How to change the background while running

Put this code in a new project don’t spam my email for references only

-- Made By Daniel Kane
-- daniel.kane@y7mail.com
-- DONT COPY




-- Background

-- Use this function to perform your initial setup
function setup()
    print("For Black do all 0")
    print("For White do all 255")
    parameter.integer("Red",0,255,0)
    parameter.integer("Green",0,255,0)
    parameter.integer("Blue",0,255,0)
end

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(Red,Green,Blue)

    -- This sets the line thickness
    strokeWidth(5)

    -- Do your drawing here
    
end

@SkyTheCoder My bad, I see! Well I hope the colour picker parameter command helps if you did not see it already @Dantheman2001

Put this in setup()

colorbg = color(40,40,50)
parameter.color("colorbg",colorbg)

Put this in draw()

background(colorbg)

You could also add a callback to the parameter.color to change the background but that requires backingMode(RETAINED)

Try this. Just tilt in different directions.


supportedOrientations(PORTRAIT)
displayMode(FULLSCREEN)

function draw()
    background(math.abs(Gravity.x*256),math.abs(Gravity.y*256),math.abs(Gravity.z*256))
end

@Luatee @dave1707 I believe he was sharing his code, not asking for help…

@SkyTheCoder I was sharing my code, not offering help.