Prevent RGB swatch from going to grayscale?

Marcos's icon

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?

Luke Hall's icon

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

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

Marcos's icon

Yeah, guess I have to do that, thanks!

seejayjames's icon

marcoskohler wrote on Thu, 21 May 2009 17:24I 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's icon

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

Emmanuel Jourdan's icon

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

div's icon

Super!

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

Tim