Forums > MaxMSP

Prevent RGB swatch from going to grayscale?

May 21, 2009 | 10:24 pm

I have around 15 rgb swatches controlling various objects on screen. If a user uses the swatch and makes it white, saves the preset, then later recalls that preset…that swatch is now in total grayscale mode and I can’t choose colors…the only fix I have is to have a default preset that has each swatch a color…THEN they revert back to full color scale.

Suggestions?


May 22, 2009 | 12:49 am

As a work-around you could include a [slider] or [flonum] hooked up to send the "saturation" value to the [swatch] and store this in the [preset] too. You could also use the second outlet to trigger the saturation value on recall, although this wouldn’t work if you are storing different values for each slot. Here is a comparison.

lh

– Pasted Max Patch, click to expand. –

May 22, 2009 | 1:17 am

Yeah, guess I have to do that, thanks!


May 22, 2009 | 6:19 am
marcoskohler wrote on Thu, 21 May 2009 17:24
I have around 15 rgb swatches controlling various objects on screen. If a user uses the swatch and makes it white, saves the preset, then later recalls that preset…that swatch is now in total grayscale mode and I can’t choose colors…the only fix I have is to have a default preset that has each swatch a color…THEN they revert back to full color scale.

I’ve noticed this with swatch for a long time, and it’s kind of annoying. The saturation suggestion will work most of the time, but the swatch can still go grayscale when you don’t want it to… I don’t think there’s an order of operations for recalling presets? Though maybe it’s right-to-left, that could be good to know. Then you could be sure the saturation is set first, then the swatch, etc.

Could be a good feature request / "bug" to mention, since it doesn’t make much sense to go grayscale just for choosing white (or sending values close to 1.0 1.0 1.0 into the swatch). Plus I think it does it with very "black" values too.

Another workaround would be to use [suckah] and have it over a picture of a swatch, then preset the values that come out. But then you’d have to deal with showing where the preset was positioned over the swatch, if you want that feedback, which could be a pain. Though if you used a pictslider and a suckah this could work, the pictslider saves the position and the suckah sends out the RGB.

Regardless, the grayscaling behavior of swatch would be a nice fix, it would then behave as one would intuitively think it should.



div
May 30, 2009 | 7:59 am

yes it really is a bug… would be nice to have it fixed…


June 1, 2009 | 11:38 pm

Not really a bug ‘cos the values are properly restored… but improved for the next incremental anyway. Thanks.



div
June 2, 2009 | 7:07 am

Super!

You’re right it is not a bug but as an interface object its behaviour is not very intuitive i guess.

Tim


Viewing 7 posts - 1 through 7 (of 7 total)