Go to: Synopsis. Flags. Return value. Python examples.
grabColor([hsvValue=boolean], [rgbValue=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
grabColor is undoable, queryable, and editable.
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 | ||
|---|---|---|---|---|
rgbValue(rgb)
|
boolean
|
|
||
|
||||
hsvValue(hsv)
|
boolean
|
|
||
|
||||
import maya.cmds as cmds cmds.grabColor() cmds.grabColor( hsv=True ) color = cmds.grabColor()