RGB color dialog

The value dialog RGBColorDialog is used to create a button that allows to open the dialog for a RGB color selection.

../../../../_images/RGBColor.png

Clicking the button opens the RGB color dialog like

../../../../_images/RGBColorDialog.png

After closing the dialog, an icon with the selected RGB color is displayed in the button and the ID of the selected color is assigned to the parameter.

Syntax

<Parameter>
<Name>ColorID</Name>
<Text>Color</Text>
<Value>255</Value>
<ValueType>Integer</ValueType>
<ValueDialog>RGBColorDialog</ValueDialog>
</Parameter>

Optional tags

If the PythonPart should be localized, the following tag must be added

<TextId>1001</TextId>

Sometimes it’s useful to disable or hide the button depending on the value of another parameter. This is achieved by adding additional tags to the parameter or by defining functions in the py-file. See Enable and visible options

The persistent state of the parameter can be changed by adding

<Persistent></Persistent>

Example

The implementation of the RGBColorDialog value dialog is described in the example AllControls located in

..\etc\Examples\PythonParts\PaletteExamples\AllControls.pyp
..\etc\PythonPartsExampleScripts\PaletteExamples\AllControls.py