A newer version of Max is available. Click here to access the latest version of the documentation

colorpicker Reference

Select and output a color



Display a color, or retrieve selected RGB color values


The colorpicker object uses an Operating System color picker dialog that lets you choose a color to be output as a Max RGB color. On the Mac OS, the Color Picker dialog that lets you choose colors in several different color spaces--red-green-blue (RGB), hue-saturation-value (HSV), web-safe colors, and the nostalgia-inducing crayon mode. On Windows, you are presented with a standard color picker dialog, including a selection of basic colors, custom colors, a color swatch and numerical input for red-green-blue (RGB), hue-saturation-luminance (HSL)




compatibility [int]

Sets the output format used by the colorpicker object. When set to zero, the output will be in RGBA format (four floating point numbers in the range 0. - 1.0). Setting this attribute to 1 (the default) will output RGB format (three integer values in the range 0 - 255).

currentcolor [4 floats]

Picker Initial Color

Common Box Attributes



Same as double-clicking the object. See the entry for (mouse).



red [number]
green [number]
blue [number]
alpha [number]
A list of numbers can be used to set the RGB or RGBA color components of the default color that initially appears in the Color Picker dialog when it is opened. A list of four floating poing numbers in the range 0. - 1.0 will specify the default color in RGBA format. For compatibility, a list of three integers in the range 0 - 255 will specify the color in the old style RGB format.


Double-clicking the object opens the Color Picker dialog box. If the patcher is unlocked, hold down the Command key on Macintosh or the Control key on Windows while double-clicking to open the dialog.



After you open the Color Picker dialog box and make a selection, clicking on the OK button will send a list of the RGB equivalents of the color you selected out the outlet. If you click the Cancel button, no messages are sent.

See Also

Name Description