Render: setBackgroundColor

setBackgroundColor(color)
  • Sets the color of the background.

color:

  • Type: float List [ r, g, b, a]
  • r = red color value
    Type: float
    Range: 0.00 to 1.00
  • g = green color value
    Type: float
    Range: 0.00 to 1.00
  • b = blue color value
    Type: float
    Range: 0.00 to 1.00
  • a = alpha chanel value
    Type: float
    Range: 0.00 to 1.00
    Sample Code

    ################  set the background color

    # import bge module
    import bge

    # get the render module
    rend = bge.render

    # color of the background to blue
    color = [ 0.0, 0.0, 1.0, 1.0]

    # set the background color
    rend.setBackgroundColor(color)