Custom popup menu for color selection

I'd like to create a popup menu to select colors, but would like to bring up a selected color palette instead of allowing the user to select from the entire *COLORPOP* selection. Is there a way to prompt the user to select from the pre-selected colors in the "Custom colors" section in the attached image?

To be clear, it doesn't need to be the built-in "Custom colors" section. I just mean that I want the user to be able to select from a subset of all of the available colors, so that all charts use the same color palette of 5-10 previously designated colors.
Nope.

You'll need your own custom panel with five color popups.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Can you point me into the direction of how to create custom popups like this? (That's really the intention of my poorly-worded original question).

I can't figure out the programming sequence to create an item in a menu list that is a solid color of a specified (r,g,b) value.

I read through the "Setting the Popup Menu Items" section of the popupmenu help entry. Perhaps my question is more about the escape sequence to generate a solid colored block without text?
Are you wanting this in a user-defined menu (somewhere in the menu bar or in a contextual menu), or a PopupMenu control?

Either way, Igor doesn't offer a custom palette color picker, but for a PopupMenu control you could (with considerable effort) implement something like the PopupWaveSelector that instead pops up a list of colors in a ListBox control.

See PopupWaveSelector.ipf, loaded when you add this line to your procedure window:

#include <PopupWaveSelector>


--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Jim didn't do the right thing to get the include line...

But really you should check the demo experiment: File->Example Experiments->Programming->WaveSelectorWidgetExample.pxp

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thanks for the suggestions. I loaded the sample experiment and got a pop-up of wave names, but didn't see any custom color panels.

I think that boil down my question to a simpler question: how can I create a single custom color panel in a menu for the user to select? Once I can figure out how to create a single entry in the popup menu that shows a swatch of a single color, I think that I can figure it out from there, but that's the piece of code that's eluding me.
I think the intention of the pointer to PopupWaveSelector was as an example of the sorts of things that can be done with great effort :) You could probably use a similar idea of a control panel with a listbox in it that pops up on a mouse click. The listbox can have list items with colored backgrounds, and maybe color names as the text instead of wave names. It would be similar to the active listbox in the Color Wave Editor package (Data->Packages->Color Wave Editor).

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
I have worked my way through the example and can see now how to manage the background color in a listbox using the colorwave parameter.

Unless there's a way to select the background color of an individual listing in a popup menu, I'm inclined to do this with buttons of specified color and associated checkboxes.

Am I correct that there's not a way to modify the background color of a popup menu?
Maybe you should look at creating a CustomControl?

That's actually a bit easier than a popup listbox.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.