I am wondering if there is a way that I can change the background color and possibly the color of other elements slightly, for each mode (Object, Edit, Sculpt, Vertex, Weight, Texture) so that it is easier to tell visually which mode I am in aside from the mode selector as an indicator.

Could it be done with some python scripting? Is there an add-on out there that would do it?

Example: Object Mode = slight blue background, Edit Mode = slight green background, etc.

  • 1
    $\begingroup$ I am mostly sure that this is not possible, but at a longer thought I think it is a great idea. Try maybe posting it here: blender.community/c/rightclickselect $\endgroup$ – cgslav Feb 10 '18 at 9:25
  • $\begingroup$ I'm pretty hopeful it's doable with python. $\endgroup$ – Haunt_House Feb 10 '18 at 11:55

Set World Background on and run this script via Blender text editor.

enter image description here

import bpy

Modes = {'OBJECT':(1, 0, 0),
        'EDIT':(0, 1, 0),
        'SCULPT':(0, 0, 1),
        'VERTEX_PAINT':(1, 1, 0),
        'WEIGHT_PAINT':(1, 0, 1),
        'TEXTURE_PAINT':(0, 1, 1)}

def my_handler(scene):
    mode = bpy.context.object.mode
    scene.world.horizon_color = Modes[mode]

def register():

def unregister():

if __name__ == "__main__":
  • $\begingroup$ I don't understand what you mean by "Set World Background on". Isn't it enabled by default? When I go into the World tab>Surface>Surface it is set to background and has a color. I ran the script but nothing changed. $\endgroup$ – Bryson Jack Feb 12 '18 at 22:55
  • $\begingroup$ Okay, I was able to get your script to work if Viewport Shading mode is set to rendered. How difficult would it be to modify that script to alter the theme background color based on the different modes? $\endgroup$ – Bryson Jack Feb 13 '18 at 23:04
  • $\begingroup$ Thanks for explaining that. I appreciate you offering a working solution. I can get it to work with factory settings but in my startup file it doesn't work. Some add-on must be interfering with the script. I guess I am still looking for a solution. $\endgroup$ – Bryson Jack Feb 22 '18 at 19:51
  • $\begingroup$ How would one get the script to also enable Paper Sky and Blend Sky? Also, how would one get the script to load on startup? $\endgroup$ – Bryson Jack Feb 22 '18 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.