I need an eyedropper button in my UI. My question is about how do I use bpy.ops.ui.eyedropper_color() correctly? I tried


which nicely draws me a button on the UI, but has no function (but also no error message). I also tried


which is successful, but automatically assigns the color to the active brush, while I need to assign it to my own prop. Furthermore, I need it outside the paint context. ...any ideas?

  • $\begingroup$ You want a color picker, right? If yes, see: blender.stackexchange.com/questions/6154/…, blender.stackexchange.com/questions/10665/…, blender.stackexchange.com/questions/6984/… $\endgroup$
    – p2or
    Commented Jun 8, 2015 at 17:31
  • $\begingroup$ hm no, that's not it... what I need is a pipette functionality which can be accessed directly by a button / hotkey, without having to open a color wheel widget. $\endgroup$
    – Mayqel
    Commented Jun 8, 2015 at 18:16
  • $\begingroup$ Ok. What do you want to pick? $\endgroup$
    – p2or
    Commented Jun 9, 2015 at 9:06
  • 1
    $\begingroup$ well, imagine you have a global hotkey, or a button on the menu bar or something like that. You press / click it, the cursor becomes a pipette icon and you can sample a color from anywhere on the screen (e.g. from a video in the sequencer, or from an RGB node's color field, just everywhere). The cool thing: the eyedropper of the standard color picker widget (bpy.ops.ui.eyedropper_color, that is) is doing exactly what I want. I just need it outside this widget.(which doesn't work so far) $\endgroup$
    – Mayqel
    Commented Jun 9, 2015 at 15:31


You must log in to answer this question.

Browse other questions tagged .