How to remove color from an icon?

When using icons in a different context than they where made for it would be very useful to remove the color of the icons. When the icons are shown in the text editor most of them are without color. How do I in python show the version without color?

Unfortunately you can’t currently. The icon category is hardcoded for each icon in UI_icons.h.

@brecht: I think you had an idea of how to solve this, so we can use the same icons in different contexts?

We’ll improve the icon coloring further to automatically avoid icons getting colored randomly in menus like happens here.

Note however that you should not add icons for every menu item, especially if it means reusing an icon designed for a different purpose. Icons can be used in a few places to give extra structure to the menu, but in this screenshot for example I don’t think there should be icons for Split, Cut, Lift, Extra and Duplicate Strips.

1 Like

So actually I shouldn’t use icons in a different context than they were meant for? Okay.

It just seems strange, on the coloring, that the add-on in the Text Editor is able to show the icons without colors… but hey, what do I know. :slight_smile:

Well put - I didn’t even stop to look at the purpose. As @brecht says, we are trying to get away from re-using the same icons to mean lots of different things - in the end this makes the meanings of the icons muddy, and undercuts the use of them in the first place.

Not every menu command needs an icon - in fact I’d encourage you to mostly not do it at all. See 3D View menus for an example.

Okay. No problem. Glad I asked.