Prevent RGB swatch from going to grayscale?

May 21, 2009 at 10:24pm

Prevent RGB swatch from going to grayscale?

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?

#44031
May 22, 2009 at 12:49am

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. –
#158150
May 22, 2009 at 1:17am

Yeah, guess I have to do that, thanks!

#158151
May 22, 2009 at 6:19am
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.

#158152
May 30, 2009 at 7:59am

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

#158153
Jun 1, 2009 at 11:38pm

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

#158154
Jun 2, 2009 at 7:07am

Super!

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

Tim

#158155

You must be logged in to reply to this topic.