# How to prevent Dynamic activity with color swatches in V10+

Since version 10, if I type e.g. an RGBColor or simply a named color, a dynamic colour swatch is returned.

Same goes for when you e.g. extract colours from a plot (in this case called p).

I'm wondering if there is a simple option that I have overlooked to turn this behaviour off. I've had a look through the Options Inspector and system options but there was not anything obvious.

Edit

Just to be clear, my preferred solution is to have RGBColor[1,0,0] returned or alternatively the swatch without the tooltip and dynamics (just the Graphics[…])

• One way is to clear FormatValues[RGBColor] =. after unprotecting it. I'm really wondering whether anyone uses these swatches. I hate them. It's as useful as having img=.. and then a big inline image on the right side. Awful. – halirutan Dec 19 '15 at 8:25
• @halirutan On the contrary, I use them a LOT! I find them more concise and more informative than a triplet of RGB numerals. Though I'm quite good in reading those, swatches save some extra shift-entering for me. It obviously fits in the symbolic nature of Mathematica. And of course one always can use FullForm on them. – István Zachar Dec 20 '15 at 10:41
• @halirutan I use them to colour code the probabilities from classifications but don't want tooltips and for them to be clickable with a colour selection window appearing. In other words for app building it is very annoying. – Mike Honeychurch Dec 20 '15 at 22:33

This should work:

SetSystemOptions["TypesetOptions" -> "ColorDirectiveSwatches" -> False]

• Thanks Simon. I suspected that there had to be a system option for that – Mike Honeychurch Dec 19 '15 at 21:29

You can disable this interactivity (and keep the swatches) with the Deploy function.

yields a deployed version of expr in which elements such as Slider, InputField, Locator and Button are active, but general editing and selection is disabled.

Deploy@Red


Hope this helps.

• Have you tried it yourself? It does not work for me (tested with versions 10.2 and 10.3.1 on Win7 x64). – Alexey Popkov Dec 19 '15 at 14:36
• @AlexeyPopkov Of course I've tried it. Works fine for 10.3.1 and 10.2 on Win 8.1 Pro 64bit. I use Deploy all the time. – Edmund Dec 19 '15 at 14:43
• Very strange, here is what I get: screenshot. – Alexey Popkov Dec 19 '15 at 15:25
• @AlexeyPopkov Correct. That is what you should get. Notice that you don't get the dynamic colour swatch with all the editing bits which is what he has asked to turn off. – Edmund Dec 19 '15 at 15:51
• Thanks, now I see your point. It seems I misunderstood the question: I thought that the OP wants Red to return RGBColor[1, 0, 0] as it was in the previous versions. BTW the editing palette on my system does not work unless I click the Advanced button, seems to be a bug (version 10.3.1). Does it work for you? – Alexey Popkov Dec 19 '15 at 16:01