← All ideas
  • Published 20 Feb 2023

Colored UI Elements (Buttons etc.)

There has been several times when I wanted to highlight a button in a panel, or a list or any layout element.

The only way is to missuse the .alert = True function. However, this should only be used for alerts.

But what about something like this?

row=layout.row()

row.highlight= True

row.highlight_color= green

0%

Development Status: Done

Upvote 0 Downvote 0
juliushilker
20 Feb 2023

1 Comment

pablovazquez

Use row.active_default = True before the button.

I'd recommend not to abuse it though. Keep it only for primary actions. If everything is highlighted then the user does not pay attention to it anymore.

More info: docs.blender.org/api/latest/bpy.types.UILayout.html