This command changes the cursor and enters a modal state which will be exited by pressing a mouse button. The color component values of the pixel below the cursor at the time of the button press are returned.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
hsvValue (hsv) | bool | ||
The 3 returned float values will specify the hue, saturation and value color components.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
rgbValue (rgb) | bool | ||
|
Derived from mel command maya.cmds.grabColor
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.grabColor()
# Result: [0.59215688705444336, 0.25098040699958801, 0.23921568691730499] #
pm.grabColor( hsv=True )
# Result: [240.0, 0.0046082944609224796, 0.85098040103912354] #
color = pm.grabColor()