When I work in edit mode and wireframe I have difficulty to visualize the loops of the object. How can I change the background color of the viewport or the color of the wires? Thanks, Dov
You can change the background color by going to: User Preferences > Theme > 3D View > Theme Background Color > Gradient High/Off
Note: CTRL + ALT + U opens user preferences immediately.
You can also change the color of the wire by using Wire and Wire Edit in the same menu.
As in Blender 2.93, Atkay's answer still applies in order to change 3D viewport's background color from GUI.
To do this programmatically, sreenivas' comment to this answer works pretty well:
bpy.context.preferences.themes.view_3d.space.gradients.high_gradient = new_color
To define a new color, you just define its 3 component's values like
(r, g, b), with values in the range [0, 1]
...themes['Default']..., as commented in a previous answer, makes Blender crash.