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

Synopsis

displayRGBColor([create=boolean], [hueSaturationValue=boolean], [list=boolean], [q=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 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.

Flags

create, hueSaturationValue, list, q, resetToFactory, resetToSaved
Long name (short name) [argument types] Properties
list(l) boolean create
Writes out a list of all RGB color names and their value.
resetToFactory(rf) boolean create
Resets all the RGB display colors to their factory defaults.
resetToSaved(rf) boolean create
Resets all the RGB display colors to their saved values.
create(c) boolean create
Creates a new RGB display color which can be queried or set. If is used only when saving color preferences. name Specifies the name of color to change.
hueSaturationValue(hsv) boolean createquery
Indicates that rgb values are really hsv values. Upon query, returns the HSV valuses as an array of 3 floats. r g b The RGB values for the color. (Between 0-1)

In query mode, this flag needs a value.

q(query) boolean
Allows you to query a color setting.

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.

Return value


Returns an array of 3 floats in query mode.

Related

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

Python examples

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 )