Go to: Synopsis. Return value. Related. Flags. Python examples.
displayRGBColor(
string
, [alpha=boolean], [create=boolean], [hueSaturationValue=boolean], [list=boolean], [resetToFactory=boolean], [resetToSaved=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
displayRGBColor is undoable, queryable, and NOT editable.
This command changes or queries the display color for anything
in the application that allows the user to set its color.
These colors are part of the UI and not part of the saved
data for a model. This command is not undoable.
string | when the list flag is used, none otherwise |
In query mode, return type is based on queried flag.
currentUnit, displayAffected, displayColor, displayCull, displayLevelOfDetail, displayPref, displaySmoothness, displayStats, displaySurface, hide, refresh, showHidden, toggle
alpha, create, hueSaturationValue, list, resetToFactory, resetToSaved
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
# Set the background colour to red
cmds.displayRGBColor( 'background', 1, 0, 0 )
# List the current RGB color settings
cmds.displayRGBColor( list=True )
# Query a RGB color by name
cmds.displayRGBColor("object", query=True)
# Query the HSVA values of a color
cmds.displayRGBColor("object", query=True, hsv=True, alpha=True)