pymel.core.general.displayRGBColor

displayRGBColor(*args, **kwargs)

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:
Long name (short name) Argument Types Properties
create (c) bool ../../../_images/create.gif
 
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) bool ../../../_images/create.gif ../../../_images/query.gif
 

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)Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

list (l) bool ../../../_images/create.gif
 
Writes out a list of all RGB color names and their value.
resetToFactory (rf) bool ../../../_images/create.gif
 
Resets all the RGB display colors to their factory defaults.
resetToSaved (rs) bool ../../../_images/create.gif
 
Resets all the RGB display colors to their saved values.

Derived from mel command maya.cmds.displayRGBColor

Example:

import pymel.core as pm

import maya.cmds as cmds

# Set the background colour to red
pm.displayRGBColor( 'background', 1, 0, 0 )

# List the current RGB color settings
pm.displayRGBColor( list=True )

Previous topic

pymel.core.general.displayPref

Next topic

pymel.core.general.displaySmoothness

Core

Core Modules

Other Modules

This Page