Color Picker Dialog

The following method can be used to create a color picker dialog without using a colorPicker rollout control.

This method is available in 3ds Max 2008 and higher. It was previously available in the Avguard Extensions.

colorPickerDlg <init_color> <title_string> alpha:<boolean> pos:<&Point2> applyUIScaling:<true>

Displays a modal color picker.

init_color is the initial color

title_string is displayed in the title bar of the color picker.

If alpha: is true, the color picker supports alpha.

pos: specifies the position of the dialog.

If pos: is specified as a by-reference variable, the position of the dialog when closed is written back to the specified variable.

If pos: is not specified, the dialog is displayed at its last position.

If pos: is [-1,-1], the dialog is displayed centered on the 3ds Max window.

If the color picker is closed other than via pressing OK, a value of 'undefined' is returned.

applyUIScaling indicates whether to apply UI scaling on high-DPI displays.

EXAMPLE USAGE:

   colorPickerDlg (color 100 200 300) "Pick A Better Color:" alpha:true pos:[100,100]

RESULT: