I have a NSPopUpButton which contains a list of colors. In front of the color title, I need to display a small box of the same color (maybe an image of same color). So, I was thinking that if I can create an NSImage using NSColor (which will be already present), then I can use the -[NSMenuItem setImage:] method to display the image in front of the color title in the popup button.
So, how can I create an NSImage using NSColor?
Any other approaches to solve the problem are also welcome. :)