Go to: Synopsis. Return value. Related. Flags. Python examples.

Synopsis

displayColor( string , [active=boolean], [create=boolean], [dormant=boolean], [list=boolean], [queryIndex=int], [resetToFactory=boolean], [resetToSaved=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

displayColor 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. The color is defined by a color index into either the dormant or active color palette. These colors are part of the UI and not part of the saved data for a model. This command is not undoable.

Return value

None

In query mode, return type is based on queried flag.

Related

currentUnit, displayAffected, displayCull, displayLevelOfDetail, displayPref, displayRGBColor, displaySmoothness, displayStats, displaySurface, hide, refresh, showHidden, toggle

Flags

active, create, dormant, list, queryIndex, resetToFactory, resetToSaved
Long name (short name) Argument types Properties
active(a) boolean create
Specifies the color index applies to active color palette. name Specifies the name of color to change. index The color index for the color.
create(c) boolean create
Creates a new display color which can be queried or set. If is used only when saving color preferences.
dormant(d) boolean create
Specifies the color index applies to dormant color palette. If neither of the dormant or active flags is specified, dormant is the default.
list(l) boolean create
Writes out a list of all color names and their value.
queryIndex(qi) int create
Allows you to obtain a list of color names with the given color indices.
resetToFactory(rf) boolean create
Resets all display colors to their factory defaults.
resetToSaved(rs) boolean create
Resets all display colors to their saved values.

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.

Python examples

import maya.cmds as cmds

cmds.displayColor( 'grid', 15, dormant=True )
cmds.displayColor( 'grid', q=True, dormant=True )
cmds.displayColor( list=True )
cmds.displayColor( resetToFactory=True )
cmds.displayColor( queryIndex=15 )