Max/MSP object default colors in [Swatch]?

bronzebygold's icon

The [swatch] object takes a list of four floats and turns that into a color which it outputs. (Is this called an RGB color?) Anyway, I need to return a [flonum] object to the Max/MSP default color scheme after having changed its color with [swatch]. For the life of me I can't figure out what the RGB list would be for the Max default colors! (Is there a way to simple print an object's color attributes?)

I must just be looking in the wrong places. Can anyone find this information?

Thanks

metamax's icon

You can dynamically change the color of an object with a sendbox script.

Max Patch
Copy patch and select New From Clipboard in Max.

-

If you want to change the default color of the flonum go to option -> object defaults -> all -> flonum

swatch outputs RGBA (red, green, blue, alpha)

bronzebygold's icon

Hi Metamax,

Thanks, that helps! However, what I was really looking for was what are the RGBA values for the default max color scheme? So for instance, what is the RGBA list for the "out-of-the-box" object border color, background color, highlighted color, etc.? Does anyone know what these are?

Thanks!
Daniel

metamax's icon

They are in the inspector for any given object as well as Options > Object Defaults…

Obviously divide [0..255] values by 255 for the [0..1] normalized values in which case alpha is generally assumed to be 1 unless specified.

bronzebygold's icon

I must be missing something. How do I get from this (screenshot) to the RGBA color list that [swatch] can take as a list input?

Thanks for continuing to help me despite my incompetence here...

Screen-Shot-2014-01-30-at-4.43.22-PM.png
png
metamax's icon

Click the slider icon at the top to reveal the [0..255] RGB values.

Manually copy them to a message box. Pass the list through vexpr $f1/255. Append a 1. to the output.

metamax's icon

You can also go into the default-definitions folder and grab [0..1] default values from the .maxdefines file for a given object.

bronzebygold's icon

Cool! I never knew about those sliders. Thanks a million.