1
$\begingroup$

The color palette is accessible in various menus, (Format -> Text Color -> Palette) or by right-clicking the cell & (Cell Background -> Palette).

I would like to use that palette to define colors to be used in functions like Plot. Somewhere in the documentation, I know I've seen an expression that may be used in options specification and that - when one uses Evaluate-In-Place (via Ctrl+Shift+Enter in Windows) - yields a box that when clicked brings up this palette, however, I can't find the entry in the documentation.

Evaluate-In-Place after highlighting Red gives RGB only color specification, and the same on a Hue[1] gives the hue equivalent, but neither equate to the palette options.

Does anyone know how to use the color palette available through the menus to specify colors for use in plotting functions, etc. ?

[This technique has the extra feature (over Hue or RGB) that one may use saved Custom Colors via the palette.]

Edit: The question here is very similar.

$\endgroup$
  • $\begingroup$ ColorSetter[]? $\endgroup$ – MarcoB Aug 18 '15 at 23:08
  • $\begingroup$ Thank you, @MarcoB. That does seem to bring up the correct palette window, but when I choose a color using PlotStyle -> ~ it evaluated in place being the (~), it doesn't seem to work and reverts back to the default. I know I've seen a version that works to set plotting options somewhere. $\endgroup$ – Ghersic Aug 18 '15 at 23:18
  • 3
    $\begingroup$ If that's OK with you, I think we could leave the question around as a signpost to point at possible duplicates. Other people might search the site using your wording, and be directed to the relevant results that way. Related questions are: Quickly display a color graphically, RGBColor, ColorSlider and ColorSetter, and Making ColorSetter work like a PasteButton. $\endgroup$ – MarcoB Aug 18 '15 at 23:27
  • 2
    $\begingroup$ @MarcoB Ahh, I figured it out. PlotSettings -> DynamicSetting[ColorSetter[]] works within plots. If you want to post an answer I'll accept it. $\endgroup$ – Ghersic Aug 18 '15 at 23:32
  • 1
    $\begingroup$ Great! Actually, why don't you post a self-answer, and I'll upvote it instead? :-) As I'm sure you know, self-answers are encouraged on SE. $\endgroup$ – MarcoB Aug 18 '15 at 23:36
1
$\begingroup$

As MarcoB pointed out, Evaluate-In-Place Ctrl+Shift+Enter on ColorSetter[] gives an input object that when clicked brings up the menu color palette. However, if you're putting this inside a plot (or PasteButton) you must use a dynamic function.

For putting it in plots use PlotStyle -> DynamicSetting[ColorSetter[]].

Thanks, MarcoB.

$\endgroup$
  • $\begingroup$ Thanks for putting the answer together (+1) $\endgroup$ – MarcoB Aug 19 '15 at 2:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.