Viewer3d.setBackgroundColor(red, green, blue, red2, green2, blue2);

Sets the background Color. First 3 RGB values are for top of gradient. Second 3 RGB values are for bottom of gradient.